location.js contains the methods necessary to interact with the location device. It also contains the event constants necessary to register for location based events
Field Summary | |
static java.lang.String |
EVENT_BEACON_CHANGE
The event constant used to register for the onBeaconChange event |
Method Summary | |
java.lang.String |
getLastBeacon()
Obtains the last beacon identifier reported |
int |
getNumberBeaconDetections()
Obtains the number of beacon events that must occur before a change is reported |
void |
onBeaconChange(java.lang.String beaconId,
boolean batteryLow)
This is the prototype for an event. |
boolean |
setNumberBeaconDetections(int count)
Sets the number of beacon events that must occur before a change is reported |
Field Detail |
public static final java.lang.String EVENT_BEACON_CHANGE
basic.registerForEvent(String)
,
Constant Field ValuesMethod Detail |
public void onBeaconChange(java.lang.String beaconId, boolean batteryLow)
beaconId
- The newly detected beacon identifierbatteryLow
- True when the battery level of the transmitting beacon is low. Always false if this feature is not supported by the beacon.EVENT_BEACON_CHANGE
Host Application | LocationHostApplication |
Host Applet | LocationHostApplet |
Message Classes | (TBD) |
public java.lang.String getLastBeacon()
Host Application | N/A |
Host Applet | LocationHostApplet |
Flow | The last beacon id is buffered in the host applet. |
public boolean setNumberBeaconDetections(int count)
count
- The number of identical beacon identifiers detected before a "onBeaconChange" event is fired
Host Application | LocationHostApplication |
Host Applet | LocationHostApplet |
Message Classes | (TBD) |
public int getNumberBeaconDetections()
Host Application | LocationHostApplication |
Host Applet | LocationHostApplet |
Message Classes | (TBD) |