Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface LocationSharedListener
Receives the location a LocationButton obtained.
A single method, so it can be written as a lambda:
LocationButton b = new LocationButton();
b.addLocationSharedListener(loc -> {
if (loc == null) {
status.setText("Location not shared");
} else {
status.setText(loc.getLatitude() + ", " + loc.getLongitude());
}
status.getParent().revalidate();
});
Methods
public abstract void locationShared(Location location) | Invoked on the EDT once the user has answered, whether or not that produced a location. |