Google's FusedLocationProviderApi
for Android was recently deprecated within the past few months, with FusedLocationProviderClient
being its successor so I recently updated the location APIs used in my client's app to use the new ones.
Every time onLocationAvailability
is fired in LocationCallback
I notify the user when locationAvailability.isLocationAvailable()
returns false
, but it appears that this condition occurs more often than I expected on some devices. I run these location updates inside a foreground Service
and it is crucial that these location updates remain consistent. Is there a way to determine the cause of this failure so
- We don't indicate any false positives to the end-user
- We can try to fix the issue or at least report to the end-user what they should do?
It appears to me that either the deprecated APIs provide more insight into these issues since it was used in conjunction with GoogleApiClient
or perhaps I'm missing some smaller details.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…