I need 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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.