简体   繁体   English

我的 Android 应用在某些设备上安装(启动前)后立即询问位置权限

[英]My Android App ask location permission right after install (before launch) on some devices

I want my application to ask permission after the first launch.我希望我的应用程序在第一次启动后请求许可。 However on some devices, right after installation from play store it asks for a location permission.但是,在某些设备上,从 Play 商店安装后,它会要求获得位置许可。 Customer wants me to get rid of this behavior.客户希望我摆脱这种行为。 What might be the possible reason behind this behavior?这种行为背后的可能原因是什么?

Permission fetching in android is of 3 types. android中的权限获取有3种类型。

  1. During installation from play store on devices upto Android API level 21 (Android 5.0 Lollipop) it just shows all the permissions mentioned in the Manifest.xml file together, and no separate pop-ups arise requesting the user to provide permissions.在从 Play 商店安装到 Android API 级别 21(Android 5.0 Lollipop)的设备期间,它只是将Manifest.xml文件中提到的所有权限一起显示,并且不会出现单独的弹出窗口,要求用户提供权限。
  2. During installation from play store on devices on Android API level 22 (Android 5.1 Lollipop) separate pop-ups arise for each permission.在 Android API 级别 22 (Android 5.1 Lollipop) 设备上从 Play 商店安装期间,每个权限都会出现单独的弹出窗口。
  3. FROM API level 23 (Android 6.0 Marshmallow), the devices support run-time permissions, where we could fetch permission on any activity where the respective feature is about to be used by the user.从 API 级别 23(Android 6.0 Marshmallow)开始,设备支持运行时权限,我们可以在其中获取用户即将使用相应功能的任何活动的权限。

You can read on these links on how to use them efficiently:您可以阅读这些链接,了解如何有效地使用它们:

  1. link1 链接1
  2. link2 链接2
  3. link3 链接3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我无法在某些设备上启动我的Android应用 - I can't launch my Android app on some devices Android Lollipop 和其他设备如何请求位置权限? - How Android Lollipop and other devices ask location permission? Android GoogleMaps在某些设备上不工作,显示java.lang.SecurityException:需要INSTALL_LOCATION_PROVIDER权限 - Android GoogleMaps not working on some devices shows java.lang.SecurityException: need INSTALL_LOCATION_PROVIDER permission 离子android要求位置许可 - Ionic android ask for location permission Android应用程式侦错APK不要求某些装置的权限 - Android app debug apk does not ask for permissions on some devices Android应用无法在之前使用过的某些设备上运行 - Android app not working on some devices that it was working on before Android应用在启动后立即停止 - Android app stopped right after launch 安装后,我的应用在某些 Android 版本上没有开始按钮 - After install my app has no start button on some Android versions 我的Android应用在某些新设备上不兼容 - My android app is not compatible on some new devices Android要求获得在Webview中使用位置的权限 - Android Ask for permission to use location within webview
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM