Jump to content


Photo

How to detect phone power down

- - - - -

  • Please log in to reply
1 reply to this topic

#1
monikker

monikker

    Newbie

  • Members
  • Pip
  • 2 posts
I work on an application that needs to do some actions at exit. No problem when user exits it but what if phone is just turned off? I did some tests and it seems that neither WM_CLOSE nor WM_DESTROY are sent when phone is turned off. Is there any way to detect when phone is about to turn off? (Or even better is there a way to detect and delay this for a while?)

Pavel

  • 0

#2
Shuflie

Shuflie

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,294 posts
  • Gender:Male
  • Location:Belfast
  • Devices:HTC One X
  • Twitter:@Shuflie
I'm not sure if this is possible or not, but could your application intercept the power button before it gets through to the operating system, close gracefully and then send a software power off command?

  • 0
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users