Potential code for writing a plugin that controls audio on iphone
//and whereever you want to play the sound, call the lines below
float currentVolume=[MPMusicPlayerController applicationMusicPlayer].volume; //grab current User volume
[[MPMusicPlayerController applicationMusicPlayer] setVolume:1.0];//set system vol to max
[audioAlert play];
[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(setVolumeBackToNormal)userInfo:nil repeats:NO];
//and the setVolumeBackToNormal function calls this line below
[[MPMusicPlayerController applicationMusicPlayer]setVolume:currentVolume];//returns volume to original setting
Potential code for writing a plugin that controls audio on iphone //and whereever you want to play the sound, call the lines below float currentVolume=[MPMusicPlayerController applicationMusicPlayer].volume; //grab current User volume [[MPMusicPlayerController applicationMusicPlayer] setVolume:1.0];//set system vol to max [audioAlert play]; [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(setVolumeBackToNormal)userInfo:nil repeats:NO];