Gallagher Mobile Connect SDK
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
com.gallagher.security.mobileaccess.BluetoothScanMode Enum Reference

Public Member Functions

 BluetoothScanMode (int i)
 
int getValue ()
 
boolean isBackgroundMode ()
 
boolean isForegroundMode ()
 

Static Public Member Functions

static BluetoothScanMode from (int value)
 

Public Attributes

 BACKGROUND_OPPORTUNISTIC =(-1)
 
 BACKGROUND_LOW_POWER =(0)
 
 BACKGROUND_BALANCED =(1)
 
 BACKGROUND_LOW_LATENCY =(2)
 
 BACKGROUND_SCREEN_ON =(3)
 
 FOREGROUND_ONLY =(4)
 

Detailed Description

Enables control over the behaviour of scanning for BLE readers while the app is in the foreground and background

Constructor & Destructor Documentation

◆ BluetoothScanMode()

com.gallagher.security.mobileaccess.BluetoothScanMode.BluetoothScanMode ( int  i)
36 {
37 mValue = i;
38 }

Member Function Documentation

◆ from()

static BluetoothScanMode com.gallagher.security.mobileaccess.BluetoothScanMode.from ( int  value)
static
47 {
48 for(BluetoothScanMode m : BluetoothScanMode.values()){
49 if(m.mValue == value){
50 return m;
51 }
52 }
53 return null;
54 }

◆ getValue()

int com.gallagher.security.mobileaccess.BluetoothScanMode.getValue ( )
42 {
43 return mValue;
44 }

◆ isBackgroundMode()

boolean com.gallagher.security.mobileaccess.BluetoothScanMode.isBackgroundMode ( )

Convenience method to test if the mode is a background mode or not

57 {
58 return this != FOREGROUND_ONLY;
59 }
FOREGROUND_ONLY
Definition: BluetoothScanMode.java:34

◆ isForegroundMode()

boolean com.gallagher.security.mobileaccess.BluetoothScanMode.isForegroundMode ( )

Convenience method to test if the mode is a foreground mode

62 {
63 return !isBackgroundMode();
64 }
boolean isBackgroundMode()
Definition: BluetoothScanMode.java:57

Member Data Documentation

◆ BACKGROUND_BALANCED

com.gallagher.security.mobileaccess.BluetoothScanMode.BACKGROUND_BALANCED =(1)

The BLE service scans continuously in the background using android's SCAN_MODE_BALANCED It will switch to LOW_LATENCY while the screen is powered on

◆ BACKGROUND_LOW_LATENCY

com.gallagher.security.mobileaccess.BluetoothScanMode.BACKGROUND_LOW_LATENCY =(2)

The BLE service scans continuously in the background using android's SCAN_MODE_LOW_LATENCY

◆ BACKGROUND_LOW_POWER

com.gallagher.security.mobileaccess.BluetoothScanMode.BACKGROUND_LOW_POWER =(0)

The BLE service scans continuously in the background using android's SCAN_MODE_LOW_POWER. It will switch to LOW_LATENCY while the screen is powered on

◆ BACKGROUND_OPPORTUNISTIC

com.gallagher.security.mobileaccess.BluetoothScanMode.BACKGROUND_OPPORTUNISTIC =(-1)

The BLE service scans continuously in the background using android's SCAN_MODE_OPPORTUNISTIC This is not recommended for use as it is very unlikely to yield good results

◆ BACKGROUND_SCREEN_ON

com.gallagher.security.mobileaccess.BluetoothScanMode.BACKGROUND_SCREEN_ON =(3)

The BLE service does not scan in the background while the screen is off. It will switch to LOW_LATENCY while the screen is powered on

◆ FOREGROUND_ONLY

com.gallagher.security.mobileaccess.BluetoothScanMode.FOREGROUND_ONLY =(4)

The BLE service does not scan in the background at all. It will switch to LOW_LATENCY when the app is in the foreground. If you set this scanMode, then the background service is not required and will not be used.


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