Skip to content

Commit

Permalink
Merge pull request #3 from sameeragunarathne/master
Browse files Browse the repository at this point in the history
add option to AVAudioSessionCategoryPlayback when setting avaudiosession
  • Loading branch information
rasika authored Dec 19, 2016
2 parents f4cc9ac + 76d2619 commit 2398c2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iOSMDMAgent/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ - (void)triggerAlert {

NSError *error = nil;
self.theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL error:&error];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
[[AVAudioSession sharedInstance] setActive: YES error: nil];
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self.theAudio play];
Expand Down

0 comments on commit 2398c2c

Please sign in to comment.