When Airplane mode is on getting position keeps loading
Opened this issue · 3 comments
Hello, when airplane mode is activated
SmartLocation.with(getContext()).location().state().isAnyProviderAvailable() and
SmartLocation.with(getContext()).location().state().locationServicesEnabled() gives true but of course on airplane mode you won't able to get any gps data , but the
SmartLocation.with(context).location()
.oneFix()
.start(new OnLocationUpdatedListener() { ... });
keep loading
Device galaxy s5 android 6
There is a time either internet or GPS is OFF and it will keep return value. I clean my project and compile again and it's okay. (this my testing result hope it help you)
I had solved it changing the AndroidManifest.xml including lines as follows:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="true" />
I hope it's help someone.
Happening to me as well.
using @edson-gaspar solution doesn't seem to work for me
using lib 3.3.3