简体   繁体   中英

How to grant runtime permissions to an android application without prompting the user

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM