Reputation: 574
I am trying to build an android application which when installed through Google Playstore should have access to the runtime permissions like SMS Access, Contacts, Location Service without asking the user for it.
I know it is possible since I have seen it happen in a couple of Android Applications on Playstore like Kotak 811 App Standard Chartered Banking App
Does anyone know how this can be achieved even when the phone is running Android Nougat.
Upvotes: 1
Views: 3575
Reputation: 69689
How to grant runtime permissions to an android application without prompting the user
AFAIK it is not possible
Please read Run Time Permissions
I am trying to build an android application which when installed through Google Playstore should have access to the runtime permissions like SMS Access, Contacts, Location Service without asking the user for it.
than you have to make targetSdkVersion
lower than 23
Does anyone know how this can be achieved even when the phone is running Android Nougat.
That is not possible and if user manually revoke the dangerous permission you app will crash
What are the disadvantages of doing
targetSdkVersion
lower than 23
if user manually remove permission from your app than you app get crash in android api 23 and above
EDIT you will not be able to ship updates to your app on the Play Store starting later in 2018
Meet Google Play's target API level requirement
Upvotes: 8