常规的Android(非融合)LocationListener的使用FusedLocationApi的启用/禁用侦听器?
https://developer.android.com/reference/android/location/LocationListener.html
所拥有的方法onProviderEnabled
和onProviderDisabled
, 这样,当用户打开/关闭GPS,你可以听。在融合的版本
https://developers.google.com/android/reference/com/google/android/gms/location/LocationListener
只有onLocationChanged
。
我想知道如何确定我的用户在使用Fused Location API时打开/关闭GPS /位置的时间。
请注意,这与要查询一次并接收布尔值是否启用或禁用位置不同;我需要一个有回调的监听器在变更时采取行动。
非常感谢您的帮助。