Last active
July 8, 2020 09:57
-
-
Save codenameone/9dc822cf80cc8bf3a6cc to your computer and use it in GitHub Desktop.
LocationListener sends events about location updates to a Codename One application that is currently in the forground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public MyListener implements LocationListener { | |
public void locationUpdated(Location location) { | |
// update UI etc. | |
} | |
public void providerStateChanged(int newState) { | |
// handle status changes/errors appropriately | |
} | |
} | |
LocationManager.getLocationManager().setLocationListener(new MyListener()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage of the LocationManager & Location API's.
From the Codename One project