I have implemented a locationlistener in my app which uses the Network Provider.
This all works fine because i want a location quickly and with GPS Provider it takes ages.
But I've come to a point in my app where location has to be accurate (max 5-10meters).
I was wondering if it's possible to use the GPS provider with the Network Provider at the same time and then get the best result of both?
And is it also possible to let me know when the GPS provider provided me with an GPS Location?
So basically:
LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
Will this work with the same overridden onLocationChanged() ?
And how can I see if the GPS has gotten a Location?
Thanks,
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…