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 运行时权限?


- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01