My first attempts at implementing Runtime Permissions are not producing the results I anticipated.
The GPS example works exactly the way I expect, but with my own simple project I find the request for granting access always comes during the application installation - not during Runtime. The message on the screen during the installation is:
"Do you want to install this application? It will get access to:
Read phone status and identity"
By the time the user starts the application, the rights have already been granted.
Am I doing something wrong, or just not understanding how this is supposed to work?
Is there a way to request the permission by clicking a button, as I am trying to do in this example?
I've attached the app.
I compiled it with sdk 27 and on my device it runs on Android 7.0.
The GPS example works exactly the way I expect, but with my own simple project I find the request for granting access always comes during the application installation - not during Runtime. The message on the screen during the installation is:
"Do you want to install this application? It will get access to:
Read phone status and identity"
By the time the user starts the application, the rights have already been granted.
Am I doing something wrong, or just not understanding how this is supposed to work?
Is there a way to request the permission by clicking a button, as I am trying to do in this example?
I've attached the app.
I compiled it with sdk 27 and on my device it runs on Android 7.0.