Search code examples
androidgpslocationandroid-loadermanager

android Location Listener


i want to listen to both GPS and NETWORK location provider from the same listener and implementation

is this ok for doing that:

        locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,metersToUpdate,this);
        locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,0,metersToUpdate,this);

will it user the same methods for both providers ?


Solution

  • Google says here:

    You can also request location updates from both the GPS and the Network Location Provider by calling requestLocationUpdates() twice—once for NETWORK_PROVIDER and once for GPS_PROVIDER.