1. // background playback
Avaudiosession * session = [avaudiosession sharedinstance];
[Session setactive: Yes error: Nil];
[Session setcategory: avaudiosessioncategoryplayback error: Nil];
2. Enable the background to Handle multimedia events
[[Uiapplication sharedapplication] beginreceivingremotecontrolevents];
Remote-control events originate as commands issued by headsets and external accessories that are intended to control multimedia presented by an application. To stop the operation of remote-control events, you must call endtransferingremotecontrolevents.
3. When the system is running in the backgroundProgramIt can run for a period of time. Use this method to get a certain amount of time and process some things after the program enters the background.
-(Uibackgroundtaskidentifier) beginbackgroundtaskwithexpirationhandler :( void (^) (void) Handler
This method lets your application continue to run for a period of time after it transitions to the background.
Your application cocould call this method to ensure that had enough time to transfer an important file to a remote server or at least attempt to make the transfer and note any errors. you shoshould not use this method simply to keep your application running after it moves to the background.
From: http://www.cnspirit.com /? P = 222