Android-EasyLocation icon indicating copy to clipboard operation
Android-EasyLocation copied to clipboard

requestSingleLocationFix returns nothing if location is null

Open saisoftdev opened this issue 7 years ago • 1 comments

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.

saisoftdev avatar Jan 17 '18 16:01 saisoftdev

I can see the is a noLocationReceived method in EasyLocationListener but for some reason the developer is not active and it is not updated in maven. For now you can manually download and import to your project and it will work as expected.

saikiran91 avatar Jan 18 '18 09:01 saikiran91