public class SensoroBeaconManager
extends java.lang.Object
getInstance(Context)
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SDK_VERSION
SDK version
|
Modifier and Type | Method and Description |
---|---|
boolean |
addBroadcastKey(java.lang.String broadcastKey)
Add a broadcast key to decrypt a Yunzi with encryption.
|
static SensoroBeaconManager |
getInstance(Context context)
Get the instance of SensoroBeaconManager
|
boolean |
isBLESuppotred()
Check whether the BLE is supported.
|
boolean |
isBluetoothEnabled()
Check whether the bluetooth is enabled.
|
void |
setBackgroundBetweenScanPeriod(long periodMills)
Set the period (in milliseconds) between two scan periods in background
|
void |
setBackgroundMode(boolean isBackgroundMode)
Sets background mode.
|
void |
setBackgroundScanPeriod(long periodMills)
set iBeaon scan period (in milliseconds) in background
|
void |
setBeaconManagerListener(BeaconManagerListener beaconManagerListener)
Set a BeaconManager listener
|
void |
setForegroundBetweenScanPeriod(long periodMills)
Set the period (in milliseconds) between two scan periods in foreground
|
void |
setForegroundScanPeriod(long periodMills)
Set iBeacon scan period (in milliseconds) in foreground
|
void |
startService()
Start Sensoro iBeacon service.
|
void |
stopService()
Stop Sensoro iBeacon service.
|
public static final java.lang.String SDK_VERSION
public static SensoroBeaconManager getInstance(Context context)
context
- The android context.public boolean addBroadcastKey(java.lang.String broadcastKey)
broadcastKey
- the broadcast keypublic void setBeaconManagerListener(BeaconManagerListener beaconManagerListener)
beaconManagerListener
- The listener to set.public void setBackgroundMode(boolean isBackgroundMode)
isBackgroundMode
- the is background modepublic void startService() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void stopService()
public void setForegroundScanPeriod(long periodMills)
periodMills
- Default value is 1.1 s(unit:ms)public void setForegroundBetweenScanPeriod(long periodMills)
periodMills
- Default value is 0 s(unit:ms)public void setBackgroundScanPeriod(long periodMills)
periodMills
- Default value is 10 s(unit:ms)public void setBackgroundBetweenScanPeriod(long periodMills)
periodMills
- Default value is 5 min(unit:ms)public boolean isBluetoothEnabled()
public boolean isBLESuppotred()