I’m currently coding a GPS application on Android. I’ve successfully getting the current location of the user, but it wont stop updating the location. How do I stop the onLocationChanged() once I get the user’s current location?
I’m currently coding a GPS application on Android. I’ve successfully getting the current location
Share
You can use
removeUpdates()for removing any current registration for location updates of the current activity with the givenLocationListener. After getting theLocationfor the first time you canunregisterLocationListnerupdates by,