android, Is this a right way of using MyLocationOverlay for getting user location to send it to server…?

StackOverflow https://stackoverflow.com/questions/7597475

Question

I am new to android. I have learned about MyLocationOverlay. It can get user location and draw a blue point on that location. I want to get user location and send it to server. Is it possible by using MyLocationOverlay to get user location. If it is, then is this a right way of getting user location using MyLocationOverlay...???

Was it helpful?

Solution

Is it possible by using MyLocationOverlay to get user location.

Yes, you can call getMyLocation(). However, as with getLastKnownLocation() on LocationManager, this may be null.

If it is, then is this a right way of getting user location using MyLocationOverlay...???

Personally, I would rather use LocationManager directly, so I have more control over how that location is determined.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top