public final class SmufsBTDevice
extends java.lang.Object
The main communication class to connect and talk to Smufs device. It provides all the required methods to get/set device properties and capture image scans.
| Modifier and Type | Class and Description |
|---|---|
static class |
SmufsBTDevice.Connection_Errors
Connection Error Codes enumeration : If device conenction fails getConnectionError returns the error Code of type Connection_Errors.
|
static class |
SmufsBTDevice.DEVICE_CONNECTION_STATUS
Device Connection Status enum is used in connection status callbacks.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelFingerScan()
Cancels the capturing process if in progress.
|
boolean |
CloseSensorPower()
CloseSensorPower : closes the sensor power if switched on and puts the sensor in sleep state.
|
boolean |
disableDevicePassword(java.lang.String devicePassword)
disableDevicePassword : Removes the device access password.
|
boolean |
disconnect(boolean shutdown)
disconnects the conencted device, if shutdownDevice is true it will shutdown the device as well.
|
static SmufsBTDevice.Connection_Errors |
getConnectionError()
Returns the reason code for the last connection status.
|
FingerImage |
getFingerScan(boolean aSync,
int timeoutms,
Handler scanProgresscallback)
getFingerScan : Requests the device to capture the finger image.
|
DeviceProperties |
getProperties()
getProperties : Returns the device properties of the connected device.
|
int |
getSDKVersion()
getSDKVersion : returns the SDK version in the following format :
MSB_Byte2_Byte1_LSB : MSB = MAJOR, Byte2 = MINOR and BYTE1 & LSB is 16 bit revision number.
|
static SmufsBTDevice |
initialize(java.lang.String deviceName,
java.lang.String devicePassword,
Handler deviceDisconnectionStatusCallback)
Initializes the SmufsBTDevice object, establishes the bluetooth connection and checks the communication channel.
|
boolean |
isConnected()
isConnected : returns the current status of BT connection.
|
boolean |
setAutoConnectFeature(boolean enabled)
setAutoConnectFeature : Enables or disables the auto connect feature.
|
boolean |
setDeviceAutoConnectCount(int count)
setDeviceAutoConectCount : Number of attempts device should try to connect back to the last connected device.
|
boolean |
setDeviceAutoConnectFrequency(int frequencysecs)
setDeviceAutoConnectFrequency : time in seconds to wait everytime device atempts to autoconnect again.
|
boolean |
setDeviceAutoShutdown(int batteryPercent)
setDeviceAutoShutdown : Device will auto shutdown at this battery percentage level.
|
boolean |
setDeviceConnectedTimeout(int timeOutsecs)
setDeviceConnectedTimeout : Device will shutdown if idle for this timeout in seconds in BT connected mode.
|
boolean |
setDeviceIdleTimeout(int timeOutsecs)
setDeviceIdleTimeout : Device will shutdown if idle for this timeout in seconds.
|
boolean |
setDevicePassword(java.lang.String devicePassword)
setDevicePassword : Sets the device access password.
|
boolean |
sleep()
sleep, can be used when application is going to background.
|
boolean |
StartSensorPower()
StartSensorPower : starts the sensor power if switched off and puts the sensor in active state ready to capture.
|
boolean |
wakeup(Handler deviceDisconnectionStatusCallback)
wakeup, can be used when application is coming to foreground.
|
public void cancelFingerScan()
public boolean CloseSensorPower()
public boolean disableDevicePassword(java.lang.String devicePassword)
public boolean disconnect(boolean shutdown)
public static SmufsBTDevice.Connection_Errors getConnectionError()
public FingerImage getFingerScan(boolean aSync, int timeoutms, Handler scanProgresscallback)
public DeviceProperties getProperties()
public int getSDKVersion()
public static SmufsBTDevice initialize(java.lang.String deviceName, java.lang.String devicePassword, Handler deviceDisconnectionStatusCallback)
public boolean isConnected()
public boolean setAutoConnectFeature(boolean enabled)
public boolean setDeviceAutoConnectCount(int count)
public boolean setDeviceAutoConnectFrequency(int frequencysecs)
public boolean setDeviceAutoShutdown(int batteryPercent)
public boolean setDeviceConnectedTimeout(int timeOutsecs)
public boolean setDeviceIdleTimeout(int timeOutsecs)
public boolean setDevicePassword(java.lang.String devicePassword)
public boolean sleep()
public boolean StartSensorPower()
public boolean wakeup(Handler deviceDisconnectionStatusCallback)