Use the Android Default GPS ON-OFF dialog in My application

后端 未结 4 1101
野的像风
野的像风 2021-02-07 04:58

In Our application we want to integrate the android Default GPS Dialog. The same dialog that appears when the GPS is OFF and we press of my location button in google map apps. H

4条回答
  •  情书的邮戳
    2021-02-07 05:10

    You need to use the latest version of Google Play service. latest version has one dialog to activate all required things to get the GPS.

    From Android Developer Play Service documentation,

    Location settings - While the FusedLocationProviderApi combines multiple sensors to give you the optimal location, the accuracy of the location your app receives still depends greatly on the settings enabled on the device (GPS, wifi, airplane mode, and others). Using the new SettingsApi class, you can bring up a Location Settings dialog which displays a one-touch control for users to change their settings without leaving your app.

    Link directs to Play Service version documentation. Version 7.0 has introduced this new prompt.

提交回复
热议问题