问题
Im writing an android aplication in which is required the actual location of the user, but I'm having trouble acquiring that location.
I'm using a LocationListener to listen for the location update, via Wifi (NETWORK_PROVIDER). The problem is I don't get an update, and I imagine it only happens when I change network. If I don't get updates, I can use lastKnowLocation but it does not provide me with the actual user's location.
Is there a way to force a location update, via NETWORK_PROVIDER?
Cheers
回答1:
Even better, I suggest you look at the new Location APIs in Google Play Services.
There's a training class for them as well.
来源:https://stackoverflow.com/questions/17303399/android-location-update