Getting last known location as null

LocationManager locMgr =
(LocationManager) getSystemService(LOCATION_SERVICE);
Location recentLoc =
locMgr.getLastKnownLocation(LocationManager.GPS_PROVIDER);


I am getting recentLoc as null. Can you please help why it is coming null?
If I am running the application for the first time, then how to get the first Location. THere is no API for the first location? We only have getLastKnownLocation()


Virendra

--
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