mrmans0n / smart-location-lib

Android library project that lets you manage the location updates to be as painless as possible
1.65k stars 353 forks source link

Can i get location from network by this library ?! #188

Open mahmooddagga opened 7 years ago

mahmooddagga commented 7 years ago

Can i get location from network by this library ?!

mahmooddagga commented 7 years ago

@mrmans0n

mahmooddagga commented 7 years ago

SmartLocation.with(context).location() .start(new OnLocationUpdatedListener() { ... });

this code work only if GPS is ON

Hemant0601 commented 7 years ago

Any update on this? How would I get location from Wifi and network without turning on GPS?

mrmans0n commented 7 years ago

Use it in a real decide not the emulator, and it works.

El jue., 16 feb. 2017 9:38, Hemant0601 notifications@github.com escribió:

Any update on this? How would I get location from Wifi and network without turning on GPS?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/mrmans0n/smart-location-lib/issues/188#issuecomment-280281215, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgnI_hxmVFXKQ4o8MavfwvbMuQANIYoks5rdBj0gaJpZM4LsHLC .

mrmans0n commented 7 years ago

Device

El jue., 16 feb. 2017 9:40, Nacho López nacho@nlopez.in escribió:

Use it in a real decide not the emulator, and it works.

El jue., 16 feb. 2017 9:38, Hemant0601 notifications@github.com escribió:

Any update on this? How would I get location from Wifi and network without turning on GPS?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/mrmans0n/smart-location-lib/issues/188#issuecomment-280281215, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgnI_hxmVFXKQ4o8MavfwvbMuQANIYoks5rdBj0gaJpZM4LsHLC .

enzonotario commented 7 years ago

@mrmans0n hi! I'm trying to get location via wifi in a real device but I can't... Is there any special code that I have to put?

Now I have this:

SmartLocation smartLocation = new SmartLocation.Builder(this).logging(true).build();
smartLocation.location(new LocationGooglePlayServicesWithFallbackProvider(mContext))
                .start(this);
@Override
    public void onLocationUpdated(Location location) {
        LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
        // some more code...
    }

Can you help me please?? Thanks!!

Ninise commented 7 years ago

@mrmans0n Same problem, when GPS and network is ON it's all ok. Location updates. true is available network true is available GPS But when I off GPS than false is available network false is available GPS

MaxToyberman commented 7 years ago

I have noticed that isNetworkAvailable is always false.