public class EmpaDeviceManager
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
EmpaDeviceManager(android.content.Context context,
EmpaDataDelegate dataDelegate,
EmpaStatusDelegate statusDelegate)
Creates a new Empatica Device Manager
|
Modifier and Type | Method and Description |
---|---|
void |
authenticateWithAPIKey(java.lang.String key)
Authenticates this Device Manager with the Empatica Backend.
|
void |
connectDevice(android.bluetooth.BluetoothDevice device)
Connects to an Empatica device
|
void |
disconnect()
Disconnects from the currently active Empatica device
|
android.bluetooth.BluetoothDevice |
getActiveDevice()
Returns the currently active device, i.e., the device this Manager is connected to
|
void |
startScanning()
Starts scanning for Empatica devices
|
void |
stopScanning()
Stops scanning for Empatica devices
|
public EmpaDeviceManager(android.content.Context context, EmpaDataDelegate dataDelegate, EmpaStatusDelegate statusDelegate)
context
- your application contextdataDelegate
- an Empatica Data DelegatestatusDelegate
- an Empatica Status Delegatepublic void authenticateWithAPIKey(java.lang.String key)
key
- public android.bluetooth.BluetoothDevice getActiveDevice()
public void startScanning()
public void stopScanning()
public void connectDevice(android.bluetooth.BluetoothDevice device) throws ConnectionNotAllowedException
device
- the Empatica device you want to connect toConnectionNotAllowedException
- if connection to device is not allowed (e.g. blacklisted device)public void disconnect()