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

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

質問

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

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top