smart-location-lib icon indicating copy to clipboard operation
smart-location-lib copied to clipboard

Can't get location fix in Android Studio 2.0 Emulator

Open c0dehunter opened this issue 9 years ago • 3 comments

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.

c0dehunter avatar May 15 '16 15:05 c0dehunter

I'm also getting this issue.

spatrickapps avatar May 27 '16 16:05 spatrickapps

Same problem in Genymotion. But on the activity with mapFragment it works but when it is on it's own it is never called.

stevyhacker avatar Jul 17 '16 15:07 stevyhacker

Use LocationParams.NAVIGATION to detect emulator mock gps changed SmartLocation.with(context).location().config(LocationParams.NAVIGATION)...

nhkhanh avatar Feb 15 '17 07:02 nhkhanh