I am trying to switch off android device through my program. It actually gets switched off but it restarts itself. I want the phone not to restart again by itself. How can I
This has been asked on StackOverflow in the past. The effective answer is that you would require the DEVICE_POWER
permission in order to shut the phone completely off, but the user would need a rooted phone to give your app permission to that control anyway.
Best you could hope for is PowerManager.goToSleep()