public interface GeofenceListener
public class GeofenceListenerImpl implements GeofenceListener { public void onExit(String id) { System.out.println("Exited "+id); } public void onEntered(String id) { System.out.println("Entered "+id); } } public void showForm() { Form hi = new Form("Hi World"); hi.addComponent(new Label("Hi World")); Location loc = new Location(); loc.setLatitude(51.5033630); loc.setLongitude(-0.1276250); Geofence gf = new Geofence("test", loc, 100, 100000); LocationManager.getLocationManager().addGeoFencing(GeofenceListenerImpl.class, gf); hi.show(); }
LocationManager.isGeofenceSupported()
LocationManager.addGeoFencing(java.lang.Class, com.codename1.location.Geofence)
Geofence
void
onEntered(String id)
onExit(String id)
void onExit(String id)
void onEntered(String id)