How to show power menu programmatically in Android

Viewed 79

i want to show the power dialog to turn off or restart the device , i found some apps in the play store , it seems they are using accessibility services , but i can't figure how to do it , anyone have any idea how to implement this ?

this is what i want to show :

Power Dialog

1 Answers
Related