开发者

how to put app icon near player controller iOS tray?

开发者 https://www.devze.com 2023-04-11 17:54 出处:网络
im not sure the screen\'s name is iOS system tray when home button doble clicked. my radio app supports background plays. everything is ok.

im not sure the screen's name is iOS system tray when home button doble clicked.

my radio app supports background plays. everything is ok.

when double clickte home button, and scroll to left, there is player control, and i c开发者_如何学Goant see my app icon just near the player control.

i have seen many radio apps, their icons are just right side of the player control.

my screen shows rotate button, player buttons and ipod icon(or empty).

any help please...


You have to set the audio session, so that iOS knows that you are playing audio. This snippet will do the trick (don't forget to read the documentation!)

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:NULL];
[[AVAudioSession sharedInstance] setActive:YES error:NULL];

Also, don't forget to set audio as a background mode that your app supports.

0

精彩评论

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

关注公众号