Reputation: 103
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 :
Upvotes: 1
Views: 943
Reputation: 1780
You can define an accessibility service and call
performGlobalAction(GLOBAL_ACTION_POWER_DIALOG)
This Google codelab will guide you through it: https://codelabs.developers.google.com/codelabs/developing-android-a11y-service/#0
Upvotes: 1