I am developing an Android application in which I am using current location of my device. I am using requestLocationUpdates("gps", 5000, 0, new LocationDetector());
method of LocationManager
for getting updates. And inside onLocationChanged()
method of LocationListener
I am making use of my device's current location. Now:
Question#1: I have recorded that the current location detected by "gps"
as well as by NETWORK_PROVIDER
has some error (error means my device's location is not exactly that which is returned by "gps" or "network_provider"). So I want to know that what is the maximum error that can be there in the result of "gps"
and NETWORK_PROVIDER
? And is there any way to get accurate results from "gps"
and NETWORK_PROVIDER
?
Question#2: In my device, "gps"
does not works within closed areas (like room), so I want to make use of "gps"
as well as NETWORK_PROVIDER
for getting location's updates. So that when my device's "gps"
is not working, I should automatically get updates through NETWORK_PROVIDER
. So please tell how can I do that?