0

I am creating a locker application, in which I want to close my application when user presses power button to lock screen or when screen off after timeout. I have tried to do this using onResume(), onPause() function but nothings works perfect.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

-1

you can do it by kill the current process by

android.os.Process.killProcess(android.os.Process.myPid());
Vikas Soni
  • 11
  • 4