I am using the following code to find the user's current location
LocationManager locationManager = (LocationManager) getSystemService (Context.LOCATION_SERVICE); LocationManager.requestLocationUpdates (LocationManager.GPS_PROVIDER, 1000L, 500.0f, this); Location changed to Public Zero (location location) {Log.e ("changed", "location"); // TODO auto generated method stub show location (location); } But the user's location is not found. If I convert the provider to the network provider in my work. But only this does not work from a GPS provider.
Change the requestLocationUpdates method so that it is updated quickly and there will be fewer changes in the coordinates. Change it to: -
requestLocationUpdates (LocationManager.GPS_PROVIDER, 0, 0, this); Try it now, if possible, move the phone more than a few meters so that it can be detected quickly by GPS satellites. I think the GPS is running.
Comments
Post a Comment