I have a recording app, and from the lockscreen, the user can pause the recording. This also makes the MPNowPlayingInfoCenter go away so that the user must go back to the app to start recording again.
However, right when the user presses the pause button, it flashes up "Music" for the property title. I've seen another app work well without "Music" popping up.
Any idea what I need to do?
Here is where the info center gets called "infoCenter is declared in the header and synthesized.
infoCenter = [MPNowPlayingInfoCenter defaultCenter];
if (infoCenter) {
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
infoCenter.nowPlayingInfo =
[NSDictionary dictionaryWithObjectsAndKeys:@"Recording", MPMediaItemPropertyTitle,
nil];
[self becomeFirstResponder];
}
}
And here are the controls:
- (void) remoteControlReceivedWithEvent: (UIEvent *) receivedEvent {
if (receivedEvent.type == UIEventTypeRemoteControl) {
switch (receivedEvent.subtype) {
case UIEventSubtypeRemoteControlPause: {
[[UIApplication sharedApplication] endReceivingRemoteControlEvents];
[self resignFirstResponder];
[self playTapped:nil]; //this is the action that pauses the recording
break;
}
default:
break;
}
}
}