I tried the below code and it s working fine

Criteria c = new Criteria();
c.setAccuracy(Criteria.ACCURACY_FINE);
        locationMgr = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
            bestP = locationMgr.getBestProvider(c, true);
                isGpsEnabled = locationMgr.isProviderEnabled(bestP);

                if (isGpsEnabled)
                {
                         Location location =
locationMgr.getLastKnownLocation(LocationManager.GPS_PROVIDER);
                        locationMgr.requestLocationUpdates(bestP, 100, 1, 
gpsListener);
                }

Try this..........

REGARDS,

SREEHARI

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