【发布时间】:2013-06-11 21:26:41
【问题描述】:
Google 建议现在使用Google Play Services 来管理用户位置。
但是我们如何使用这个 API 来检查设备是否打开了 GPS,或者我们是否仍然有 GPS 连接?
在com.google.android.gms.location.LocationListener 中,我们只有一个方法abstract void onLocationChanged(Location location),它在位置改变时被调用,但我们不知道任何关于GPS 状态的信息。
如何像“旧”LocationManager 和LocationListener 一样使用Google Play Services?
【问题讨论】:
-
使用 GPS 是指系统 -> 设置中的位置开关?
标签: android gps location google-play-services location-client