Interface location


public interface location

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

EVENT_BEACON_CHANGE

public static final java.lang.String EVENT_BEACON_CHANGE
The event constant used to register for the onBeaconChange event

See Also:
basic.registerForEvent(String), Constant Field Values
Method Detail

onBeaconChange

public void onBeaconChange(java.lang.String beaconId,
                           boolean batteryLow)
This is the prototype for an event. It is not actually implemented in this file. Triggered anytime the beacon detects a different location identifier from the last one detected

Parameters:
beaconId - The newly detected beacon identifier
batteryLow - True when the battery level of the transmitting beacon is low. Always false if this feature is not supported by the beacon.
See Also:
EVENT_BEACON_CHANGE
WATA Integration
Host ApplicationLocationHostApplication
Host AppletLocationHostApplet
Message Classes(TBD)

getLastBeacon

public java.lang.String getLastBeacon()
Obtains the last beacon identifier reported

Returns:
Returns the last beacon identifier posted by "onBeaconChange"
WATA Integration
Host ApplicationN/A
Host AppletLocationHostApplet
FlowThe last beacon id is buffered in the host applet.

setNumberBeaconDetections

public boolean setNumberBeaconDetections(int count)
Sets the number of beacon events that must occur before a change is reported

Parameters:
count - The number of identical beacon identifiers detected before a "onBeaconChange" event is fired
Returns:
Returns whether the operation was successful
WATA Integration
Host ApplicationLocationHostApplication
Host AppletLocationHostApplet
Message Classes(TBD)

getNumberBeaconDetections

public int getNumberBeaconDetections()
Obtains the number of beacon events that must occur before a change is reported

Returns:
Returns the number of consecutive times the receiver must detect the same beacon code before raising an onBeaconChange event. Returns -1 if the setting could not be determined
WATA Integration
Host ApplicationLocationHostApplication
Host AppletLocationHostApplet
Message Classes(TBD)