When your power stops the application, this is what happens - it is the Force stopped. No warning, no callbacks, just stopped. The whole process is killed, and not one of the running components (Activities, Services, etc.) receives any warnings.
There is absolutely no guarantee that onDestroy() will be called. Move any critical application code to onPause() , which is called in most cases.
Raghav food
source share