Can we switch off an Android phone programmatically?
I am using following snippet but it didn\'t work for me.
KeyguardManager keyguardManager = (Keyg
A much better solution is to run:
su -c am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN
You can use a Process for this.
Process