Android runtime permissions on android versions below M?(低于 M 的 android 版本的 Android 运行时权限?)
问题描述
最近我的ola cabs 应用,在最新更新后,请求定位权限在运行时.它没有打开位置设置屏幕,但只需单击是,设备的我的位置 (GPS) 已打开,应用程序继续进行,而无需进入位置设置或任何设置屏幕.此功能即将出现在 android M 中,并且仅在 MNC 预览版中可用,所以我猜它目前无法在设备中使用.那么这个应用程序是如何实现这个功能的呢?
Recently my ola cabs application, after the latest update, asked for location permission at runtime. It did not open the location settings screen but just by clicking on yes, my location (GPS) of the device was turned on and the application proceeded without going to location settings or any settings screen. This feature was about to come in android M and is available on the MNC preview only, so I am guessing it cannot be used in devices at this point of time. So how is this application implementing this feature?
推荐答案
是在 Play Services SDK 7.0+ 中使用 SettingsApi 到 显示位置设置对话框.
这篇关于低于 M 的 android 版本的 Android 运行时权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:低于 M 的 android 版本的 Android 运行时权限?
基础教程推荐
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
