如何在不提示用户的情况下向 android 应用程序授予运行时权限
How to grant runtime permissions to an android application without prompting the user
我正在尝试构建一个 android 应用程序,当通过 Google Playstore 安装时,它应该可以访问运行时权限,如 SMS 访问、联系人、位置服务,而无需询问用户。
我知道这是可能的,因为我已经在 Playstore 上的几个 Android 应用程序中看到它发生了,比如
柯达 811 应用程序
渣打银行应用程序
有谁知道即使 phone 是 运行 Android 牛轧糖如何实现。
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.
你必须让 targetSdkVersion
低于 23
Does anyone know how this can be achieved even when the phone is running Android Nougat.
这是不可能的,如果用户手动撤销危险权限,您的应用程序将崩溃
What are the disadvantages of doing targetSdkVersion
lower than 23
如果用户手动从您的应用中删除权限,那么您的应用会在 android api 23 岁及以上
中崩溃
编辑
you will not be able to ship updates to your app on the Play Store starting later in 2018
我正在尝试构建一个 android 应用程序,当通过 Google Playstore 安装时,它应该可以访问运行时权限,如 SMS 访问、联系人、位置服务,而无需询问用户。
我知道这是可能的,因为我已经在 Playstore 上的几个 Android 应用程序中看到它发生了,比如 柯达 811 应用程序 渣打银行应用程序
有谁知道即使 phone 是 运行 Android 牛轧糖如何实现。
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.
你必须让 targetSdkVersion
低于 23
Does anyone know how this can be achieved even when the phone is running Android Nougat.
这是不可能的,如果用户手动撤销危险权限,您的应用程序将崩溃
What are the disadvantages of doing
targetSdkVersion
lower than 23
如果用户手动从您的应用中删除权限,那么您的应用会在 android api 23 岁及以上
中崩溃编辑 you will not be able to ship updates to your app on the Play Store starting later in 2018