Skip navigation

Is there a way to check if the iOS device is in sleep mode?

902 Views 5 Replies Latest reply: Jan 9, 2013 10:00 PM by Rohit_Kashyap RSS
Rohit_Kashyap Calculating status...
Currently Being Moderated
Jan 8, 2013 10:26 PM

Hi All,

 

I have used GPS location updates in my application. I want to detect if the iOS device is in sleep mode so that I can turn off the GPS and optimize the battery use. I have already tried pausesLocationupdates in iOS 6, but it does not work as desired.

I want to turn off the GPS as soon as the device goes to sleep mode. Is there any way to achieve this functionality ?

 

Thanks in advance.

iPhone 4S, iOS 6, pausesLocationUpdatesAutomatically
  • Michael Superczynski Level 5 Level 5 (7,095 points)

    If iOS goes to sleep, your app will receive a notification automatically.

    What your app does after that is whatever you've coded it to do.

    When iOS wakes up, your app will also receive a notification automatically.

    What your app does after that is whatever you've coded it to do.

     

    iOS handles powering up/down the various radios automatically.  You don't have to worry about it.

  • Michael Superczynski Level 5 Level 5 (7,095 points)

    You can't turn off the GPS; only iOS has permission to do that.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.