如何在抖动中开启设备GPS? [英] How to turn on device GPS in flutter?

查看:91
本文介绍了如何在抖动中开启设备GPS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过使用Dart的simple_permissions和location软件包,它仅要求用户许可以允许或拒绝该应用使用设备位置在Google Maps上显示用户的当前位置。
当我在设备上手动打开GPS时,我可以获取当前位置,但是如何要求用户使用对话框启用来自应用程序本身的GPS来启用GPS(例如Google Maps)?

By using simple_permissions and location package of Dart, it is only asking for user permission to ALLOW or DENY the app to use device location to show the current location of user on Google Maps. When i turn on the GPS manually on my device, I'm able to get the current location, but how can I ask the user to enable GPS from the app itself with a dialog to enable the GPS like Google Maps?

推荐答案

通过使用 access_settings_menu ,可以为Android设备打开位置设置页面

By using access_settings_menu, the location settings page can be opened for Android devices

这篇关于如何在抖动中开启设备GPS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆