I have a call to the Android Geocoder function getFromLocation it used to work most of the times before June, 6, 2019. But after that it fails a lot.
I used to have less than 10 errors before that day, then on the 6th it spiked to a 100 and it's been around 80 a day since then.
That's what happened, and there weren't any new version or code change around these days. The exception have a message that only says "GPRC Failed"
My code is pretty standard:
try {
addresses = V1Motorista.getGeocoder().getFromLocation(lastLocation.latitude, lastLocation.longitude, 5)
} catch (e: Exception) {
Log.d("GEOCODE TRY 1", e.message)
Analytics.logError("Erro ao tentar resolver Geocode pela primeira vez", e)
}
and
class V1Motorista : Application() {
companion object {
lateinit var instance: V1Motorista
fun getGeocoder(): Geocoder {
return Geocoder(instance)
}
}
...
}
I don't really now what changed, any help appreciated.