From b2ec730c88982eaae69876a273452c7690ef6a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Wed, 5 Nov 2014 11:08:34 +0000 Subject: [PATCH] Restart playing sound when interrupted by phone calls --- src/ios/APPBackgroundMode.m | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/ios/APPBackgroundMode.m b/src/ios/APPBackgroundMode.m index e66c5a5..a99f9f3 100644 --- a/src/ios/APPBackgroundMode.m +++ b/src/ios/APPBackgroundMode.m @@ -143,18 +143,10 @@ }; /** - * Handle audio session interruption. + * Restart playing sound when interrupted by phone calls. */ - (void) handleAudioSessionInterruption:(NSNotification*)notification { - NSNumber* receivedType = [notification.userInfo - valueForKey:AVAudioSessionInterruptionTypeKey]; - - NSNumber* expectedType = [NSNumber numberWithInt:AVAudioSessionInterruptionTypeEnded]; - - if ([receivedType isEqualToNumber:expectedType]) { - [self configureAudioSession]; - [self keepAwake]; - } + [self keepAwake]; } @end