private fun requestOneTimeLocation() {
val locationRequest = LocationRequest()
.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY)
.setInterval(5000)
.setFastestInterval(5000)
val easyLocationRequest = EasyLocationRequestBuilder()
.setLocationRequest(locationRequest)
.setFallBackToLastLocationTime(3000)
.build()
requestSingleLocationFix(easyLocationRequest)
}
I use requestSingleLocationFix, the problem if the location in onLocationChanged of LocationBgService is null then there is no way to capture it and handle it. At least a callback would me much helpful.
I use requestSingleLocationFix, the problem if the location in onLocationChanged of LocationBgService is null then there is no way to capture it and handle it. At least a callback would me much helpful.