[英]How to detect when user turns off GPS with FusedLocationProviderClient?
Now that FusedLocationProvider API is deprecated, I am using FusedLocationProviderClient, but I couldn't find how to detect when user turns the location off. 现在不推荐使用FusedLocationProvider API,我正在使用FusedLocationProviderClient,但是我找不到如何检测用户何时关闭位置的方法。 Is there any listener for this?
有听众吗?
Thank you in advance! 先感谢您!
You can use https://developers.google.com/android/reference/com/google/android/gms/location/LocationCallback 您可以使用https://developers.google.com/android/reference/com/google/android/gms/location/LocationCallback
wich expose 暴露
public void onLocationAvailability(LocationAvailability locationAvailability)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.