I ne开发者_开发知识库ed to check battery status in my applicaiton when it is in background state. I can check batter status in running state. Can NSNotificationCenter be used to check battery status in background? If yes how?
Thanks
It is possible in two modes, which both keep your app alive. The first one is background audio, while you are playing music, your app will receive those notifications. The second one is background GPS tracking via Core Location.
If your app doesn't perform one of these, its state is frozen in memory and you won't receive any notification from the OS.
No, If you have background audio in your application app store will reject.
精彩评论