Is any method which i can call and it return to me information that phone actual going to shutdown (power off). I know that is intent ACTION_SHUTDOWN but I have to get information about shutting down the phone form anther source. The best is directly form system. Maybe checking of same files in /proc or in /sys fs.
Asked
Active
Viewed 338 times
1 Answers
1
Use BraodcastReceiver, extend it and override onReceive
.
public class Receiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Your code goes here
}
}
When you want to use it:
activity.registerReceiver(receiver, shutDownIntent);

dragostis
- 2,574
- 2
- 20
- 39