Skip to content

Commit

Permalink
Modified notification sound to conform to user settings... almost.
Browse files Browse the repository at this point in the history
  • Loading branch information
sammargh committed Jun 1, 2011
1 parent 4902593 commit 536e216
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions MNWhistleBlowerController.m
Expand Up @@ -44,18 +44,11 @@ -(id)initWithDelegate:(id)__delegate

-(void)alertArrivedWithData:(MNAlertData*)data;
{
// Have the device vibrate, if the ringer switch
// is flipped (and if the device supports it)
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

// Play noise, if the ringer switch is not
// flipped (and if the device supports it)
// Don't do this for push notifications

if (data.type != kPushAlert)
{
AudioServicesPlaySystemSound(1007);
}
// Play sound as an alert so the phone vibrates as the user has set
// This needs the sound pulled from the system settings to play the
// Actual set ringtone. It will still play tritone.
// The setting is in com.apple.springboard.plist sms-sound-identifier
AudioServicesPlayAlertSound(1007);

// Wake the device's screen
[_delegate wakeDeviceScreen];
Expand Down

0 comments on commit 536e216

Please sign in to comment.