Friday, 15 January 2010

android - how to check that phone was shut down by battery removal -


I searched everywhere, but no answer was found, there is no way in Android to check that in Android Removing the battery was last closed?

For example If I just take the battery of my running phone, then there is no way to tell on the next boot that the phone did not stop properly.

I'm sure there will be any flag that keeps track of the device and when we ask for the closure of Android from YouTube, it will set the flag to close.

You can set a broadcast receiver , which will be Android.intent.action.ACTION_SHUTDOWN .

If the device stops normally, it will go away. If the battery is closed by deleting it will not happen. < / P>


No comments:

Post a Comment