Vahe Dandanyan
Vahe Dandanyan

Reputation: 57

How to check Grant Permissions at Run Time when phone is locked?

My app has a runtime permission for location. It works fine in the normal cases. But when the phone is in locked state, the system permission popup/dialog does not come. Is it possible to show the system permissions dialog when the phone is in locked state as well?

Upvotes: 0

Views: 105

Answers (1)

Bhuvanesh BS
Bhuvanesh BS

Reputation: 13617

It is not possible to ask permission when the phone is locked. But you can send a Notification to the user to request permission.

On the click of Notification open an activity and get a permission from the user.

More info about Notification.https://developer.android.com/guide/topics/ui/notifiers/notifications.html

Upvotes: 2

Related Questions