Kam*_*nek 8 gps android location google-play-services location-client
Google建议现在使用它Google Play Services来管理用户位置.但是,我们如何使用此API检查设备中是否打开了GPS,或者我们是否还有GPS连接?
在com.google.android.gms.location.LocationListener我们只有一个方法abstract void onLocationChanged(Location location),当位置发生变化时调用,但我们不知道有什么关于GPS状态.
怎么使用Google Play Services像"老" LocationManager和LocationListener?
Com*_*are 10
但是,我们如何使用此API检查设备中是否打开了GPS,或者我们是否还有GPS连接?
你不能,AFAICT.我认为这个论点是因为LocationClient混合来自多个来源的数据,所以没有API来确定是否使用了任何特定的来源.
LocationManager如果要确定是否启用了GPS,则需要使用.