开发者

How to play Audio songs in background after user exits application in iPhone Apps?

I am new to iPhone apps, I am developing one application which requires playing audio songs in background that is if user exists the application also it has to playback the audio songs still user stops it. I have checked in this site for this feature but some guy gave answer that this feature is owned by Apple people for their apps before iOS4 but I found one application named "Raaga Tel开发者_如何学编程ugu" in itunes having this same feature but still working in iOS3.0 also.

some one please help me, some help would be appreciated.


You can not do this in iOS 3.x.

From Apple's iPhone App Programming Guide, Chapter 4 "Preparing Your Application to Execute in the Background", Section 2 "Declaring the Background Tasks You Support":

Support for some types of background execution must be declared in advance by the application that uses them. An application does this by including the UIBackgroundModes key in its Info.plist file. This key identifies which background tasks your application supports. Its value is an array that contains one or more strings with the following values:

audio - The application plays audible content to the user while in the background.

Start by reading this document (at least this chapter) thoroughly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜