Closed aznair closed 13 years ago
I'm assuming you need to edit this into a file? Which file exactly are you changing?
In Tweak.xm, in the function "activateAlertItem", inside the block for SMS alerts, add: if ([%c(SBSMSAlertItem) shouldPlayMessageReceived]) { [%c(SBSMSAlertItem) playMessageReceived]; } Then in MNWhistleBlowerController.m, inside "alertArrivedWithData", remove the if block.
This isn't really the "right" place to put the sound handling code but for me it's the easiest way to make it work.
Thanks! That works!
Sent from my iPad
On May 27, 2011, at 1:14 AM, aznairreply@reply.github.com wrote:
In Tweak.xm, in the function "activateAlertItem", inside the block for SMS alerts, add: if ([%c(SBSMSAlertItem) shouldPlayMessageReceived]) { [%c(SBSMSAlertItem) playMessageReceived]; } Then in MNWhistleBlowerController.m, inside "alertArrivedWithData", remove the if block.
This isn't really the "right" place to put the sound handling code but for me it's the easiest way to make it work.
Reply to this email directly or view it on GitHub: https://github.com/peterhajas/MobileNotifier/issues/207#comment_1247411
To do it properly you need to find the AudioServicesPlaySystemSound variable that is the chosen sms sound. Looking over apples audiobox frame work, i cant seem to find it =/
Yeah that was my first choice as well but as far as I can tell no such identifier exists, only specific tones :(
Check out some info regarding the SMS sounds here: https://github.com/peterhajas/MobileNotifier/pull/266 quite interesting.
This issue was fixed in this commit. Thanks for the bug report!
A lot of people seem to be complaining that MN plays the default Tri-Tone sound for SMS messages regardless of what the user actually set for the alert tone.
I've found that using [SBSMSAlertItem shouldPlayMessageReceived] and [SBSMSAlertitem playMessageReceived] to handle SMS alert tones will fix this issue.