Android Question Reading Phone State causes user to be told app will make and manage phone calls

Turbo3

Active Member
Licensed User
Longtime User
I am updating my app to support Runtime Permissions.

I am starting with a simple test app to see how this works with the Licence check code that needs android.permission.READ_PHONE_STATE which is considered "dangerous".

When I ran the app I was shocked to see the popup message the user is given. It says:

Allow APP_NAME to make and manage phone calls?

The user is then given the options of DENY or ALLOW.

On seeing this type of message even I would select DENY.

Is there a way to get a message to be displayed that is closer to the type of permission that is actually being requested which is only to get the phone state not to make any calls.
 

Turbo3

Active Member
Licensed User
Longtime User
Switched to a different way to get an id unique to the phone which solves that problem.

I also use PhoneEvents, Phone, PhoneWakeState which I had assumes (incorrectly) also needed the READ_PHONE_STATE but on closer examination of the permissions on the "List Permissions" popup I see that is not the case.

Basically I need to make sure I don't use any phone functions that require READ_PHONE_STATE and I can avoid that "fatal" permission request.

Permissions I need to request at app install are just STORAGE and LOCATION which will make sense to my users based on the function of the app.
 
Upvote 0
Top