Thursday, May 8, 2014

Release audio mic or other stuff when iPhone app goes to background keeping them in Background mode in plist

// Tell iOS this as a background task in case we get backgrounded
UIBackgroundTaskIdentifier taskId = [[UIApplication sharedApplication] 
          beginBackgroundTaskWithExpirationHandler:NULL];

//----------------------------------------------
// Perform your  operations here
//----------------------------------------------


// Tell iOS that we are done with stuff that needed to keep going even if backgrounded    
[[UIApplication sharedApplication] endBackgroundTask:taskId];

No comments:

Post a Comment