smart-location-lib
smart-location-lib copied to clipboard
Can't get location fix in Android Studio 2.0 Emulator
I'm running the new Android Emulator that comes with Android Studio 2.0. I try to get the location like this:
SmartLocation.with(getApplicationContext()).location()
.oneFix()
.start(new OnLocationUpdatedListener() {
@Override
public void onLocationUpdated(Location location) {
// do my stuff
}
});
But onLocationUpdated() is never called. I set the location in Extended Controls and also tried playing a .kml file, but I still get no location update. Am I doing something wrong or is this a bug?
This issues is also linked to oneFix not working in new Android Studio 2.0 emulator.
I'm also getting this issue.
Same problem in Genymotion. But on the activity with mapFragment it works but when it is on it's own it is never called.
Use LocationParams.NAVIGATION to detect emulator mock gps changed
SmartLocation.with(context).location().config(LocationParams.NAVIGATION)...