Hi

I'm trying to take the current location using GPS or Network which ever is
connected. The following code works fine to me if my mobile connected with
WiFi or GPS turned ON. But if both of them turned ON/Connected then it
doesnt give me any result

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3000,
0, new GeoUpdateHandler());

Location location = null;
location = locationManager.getLastKnownLocation(provider);
 if (location == null)
{
 locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
200, 0, new GeoUpdateHandler());
location = locationManager.getLastKnownLocation(provider);
}


Always Im getting "location" NULL if both off them connected.

What is wrong here ?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to