Beaconstac Android  0.9.9
com.mobstac.beaconstac.core.Beaconstac Class Reference

Public Member Functions

synchronized void startRangingBeacons () throws MSException
 
synchronized void stopRangingBeacons () throws MSException
 
void setRegionParams (String uuid, String identifier)
 
void setUserFacts (String key, String value)
 
void setUserFacts (String key, int value)
 
void setUserFacts (String key, long value)
 
void setUserFacts (String key, float value)
 
void enableGeofences (boolean enabled)
 
String getDevToken ()
 
void setDevToken (String devToken)
 
long getOrgId ()
 
void setOrgId (long orgId)
 
int getActiveScanDuration ()
 
boolean setActiveScanDuration (int duration)
 
int getPassiveScanDuration ()
 
boolean setPassiveScanDuration (int duration)
 
void syncRules ()
 
void setBeaconAffinity (MSBLEService.MSBeaconAffinity affinity)
 

Static Public Member Functions

static Beaconstac getInstance (final Context context)
 

Detailed Description

The main class and entry point for working with the Beaconstac SDK.

Member Function Documentation

void com.mobstac.beaconstac.core.Beaconstac.enableGeofences ( boolean  enabled)

This method is used to enable and disable geofences around MSPlace objects. The default state is enabled.

Parameters
enabledA boolean value to enable/disable geofences
int com.mobstac.beaconstac.core.Beaconstac.getActiveScanDuration ( )

This method is used to get the active scan duration

Returns
active scan duration
String com.mobstac.beaconstac.core.Beaconstac.getDevToken ( )

Thie method is used to get the developer token.

Returns
developer token
static Beaconstac com.mobstac.beaconstac.core.Beaconstac.getInstance ( final Context  context)
static
Parameters
contextapplication context
Returns
beaconstac singleton instance
long com.mobstac.beaconstac.core.Beaconstac.getOrgId ( )

This method is used to get the organization id

Returns
organization id
int com.mobstac.beaconstac.core.Beaconstac.getPassiveScanDuration ( )

This method is used to get the passive scan duration

Returns
passive scan duration
boolean com.mobstac.beaconstac.core.Beaconstac.setActiveScanDuration ( int  duration)

This method is used to customize the active scan duration when beacons are being scanned in foreground

The change will not take effect till you stop and start the scanning

Parameters
durationin milliseconds
Returns
true if updated
void com.mobstac.beaconstac.core.Beaconstac.setBeaconAffinity ( MSBLEService.MSBeaconAffinity  affinity)

Set Beacon Affinity value for scanning. The change will not take effect till you stop and start the scanning

Parameters
affinity
void com.mobstac.beaconstac.core.Beaconstac.setDevToken ( String  devToken)

Thie method is used to dynamically set developer token. Token, if set using this method, will override the value in beaconstac.xml

void com.mobstac.beaconstac.core.Beaconstac.setOrgId ( long  orgId)

This method is used to dynamically set the organization id. Organization id, if set using this method, will override the value in beaconstac.xml

Parameters
orgId
boolean com.mobstac.beaconstac.core.Beaconstac.setPassiveScanDuration ( int  duration)

This method is used to customize the passive scan duration when beacons are being scanned in background

The change will not take effect till you stop and start the scanning

Parameters
durationin milliseconds
Returns
true if updated
void com.mobstac.beaconstac.core.Beaconstac.setRegionParams ( String  uuid,
String  identifier 
)

This method is used to set region-related parameters to filter the beacons being scanned.

Parameters
uuidThe UUID value of beacons to filter by
identifierRegion identifier
void com.mobstac.beaconstac.core.Beaconstac.setUserFacts ( String  key,
String  value 
)

This method is used to set user-related 'facts' used by the SDK.

Parameters
keyfor the fact
valueof type String
void com.mobstac.beaconstac.core.Beaconstac.setUserFacts ( String  key,
int  value 
)

This method is used to set user-related 'facts' used by the SDK.

Parameters
keyfor the fact
valueof type int
void com.mobstac.beaconstac.core.Beaconstac.setUserFacts ( String  key,
long  value 
)

This method is used to set user-related 'facts' used by the SDK.

Parameters
keyfor the fact
valueof type long
void com.mobstac.beaconstac.core.Beaconstac.setUserFacts ( String  key,
float  value 
)

This method is used to set user-related 'facts' used by the SDK.

Parameters
keyKey for the fact
valueValue of type float
synchronized void com.mobstac.beaconstac.core.Beaconstac.startRangingBeacons ( ) throws MSException

This method is used to start ranging beacons

Exceptions
MSExceptionBLENotSupportedException - If the device does not support BLE
synchronized void com.mobstac.beaconstac.core.Beaconstac.stopRangingBeacons ( ) throws MSException

This method is used to stop ranging beacons

Exceptions
MSExceptionBLENotSupportedException - If the device does not support BLE
void com.mobstac.beaconstac.core.Beaconstac.syncRules ( )

This method is used to explicitly sync the rules for processing. By default, rules are synced every ruleSyncInterval set in beaconstac.xml


The documentation for this class was generated from the following file: