Class SimpleGollumDongle
-
- All Implemented Interfaces:
@Deprecated() public abstract class SimpleGollumDongle
SimpleGollumDongle is the main class of API.
This class is a singleton
-
-
Constructor Summary
Constructors Constructor Description SimpleGollumDongle()
-
Method Summary
Modifier and Type Method Description static GollumDongle
getInstance(Activity parentActivity)
static GollumDongle
getInstance(Context context)
static boolean
hasInstance()
abstract void
searchDevice(ScannerListener scannerListener)
To search for any Gollum device around. abstract void
stopSearchDevice()
To stop searching for any Gollum device around. abstract void
openGollumBleDevice(ExtendedBluetoothDevice device, boolean autoConnect, boolean reconnectIfError, boolean refreshDeviceCacheBeforeConnect)
Open a given Gollum Device abstract void
openGollumBleDevice(ExtendedBluetoothDevice device, boolean autoConnect, boolean reconnectIfError, boolean refreshDeviceCacheBeforeConnect, GollumBleManagerCallbacks cb)
Open a given Gollum Device abstract void
closeDevice()
Close PandwaRF connection void
destroy()
Close all device connection. abstract void
reconnect(String address)
Reconnect to a given BLE address, or last BLE address used if address is null. abstract void
pause()
Stop all connections. abstract void
signalRssi(boolean bool)
Activate or desactivate to receive the RSSI signal. abstract void
signalBattery(boolean bool)
Activate or desactivate to receive the level battery signal. abstract void
notifButtonPushed(boolean bool)
Activate or desactivate to receive the notification when a button of the dongle is pushed. abstract void
readDeviceInformation()
Allow to ask to received information about the dongle. abstract void
getLastVersionCC1111(String modelName, String hardwareRevision, GollumCallbackGetString cb)
Get the last version of CC1111 abstract void
getLastVersionNordic(String modelName, String hardwareRevision, GollumCallbackGetString cb)
Get the last version of nordic abstract String
getLibVersion()
abstract String
getLibGitHash()
abstract String
getCurrentSoftwareVersion()
abstract String
getCurrentFirmwareVersion()
abstract void
getBatteryLevel()
Read the current battery level -
-
Method Detail
-
getInstance
static GollumDongle getInstance(Activity parentActivity)
- Parameters:
parentActivity
- The calling activity being used to instantiate the SimpleGollumDongle.- Returns:
a single instance of GollumDongle
-
getInstance
static GollumDongle getInstance(Context context)
- Parameters:
context
- The calling context being used to instantiate the SimpleGollumDongle.- Returns:
a single instance of GollumDongle
-
hasInstance
static boolean hasInstance()
- Returns:
true if an instance of SimpleGollumDongle exists
-
searchDevice
abstract void searchDevice(ScannerListener scannerListener)
To search for any Gollum device around. Return a list of available Gollum Device.
- Parameters:
scannerListener
- callbacks to be called when new device is found or scan ends
-
stopSearchDevice
abstract void stopSearchDevice()
To stop searching for any Gollum device around.
-
openGollumBleDevice
abstract void openGollumBleDevice(ExtendedBluetoothDevice device, boolean autoConnect, boolean reconnectIfError, boolean refreshDeviceCacheBeforeConnect)
Open a given Gollum Device
-
openGollumBleDevice
abstract void openGollumBleDevice(ExtendedBluetoothDevice device, boolean autoConnect, boolean reconnectIfError, boolean refreshDeviceCacheBeforeConnect, GollumBleManagerCallbacks cb)
Open a given Gollum Device
-
closeDevice
abstract void closeDevice()
Close PandwaRF connection
-
destroy
void destroy()
Close all device connection. Shall be called in your activity onDestroy() method. Remove the instance of GollumDongle.
-
reconnect
abstract void reconnect(String address)
Reconnect to a given BLE address, or last BLE address used if address is null. Use after a pause(). Call this function if you want to resume BLE background connection
-
pause
abstract void pause()
Stop all connections.
-
signalRssi
abstract void signalRssi(boolean bool)
Activate or desactivate to receive the RSSI signal.
-
signalBattery
abstract void signalBattery(boolean bool)
Activate or desactivate to receive the level battery signal.
-
notifButtonPushed
abstract void notifButtonPushed(boolean bool)
Activate or desactivate to receive the notification when a button of the dongle is pushed.
-
readDeviceInformation
abstract void readDeviceInformation()
Allow to ask to received information about the dongle.
-
getLastVersionCC1111
abstract void getLastVersionCC1111(String modelName, String hardwareRevision, GollumCallbackGetString cb)
Get the last version of CC1111
- Parameters:
cb
- : Callback to call when the background task is terminated
-
getLastVersionNordic
abstract void getLastVersionNordic(String modelName, String hardwareRevision, GollumCallbackGetString cb)
Get the last version of nordic
- Parameters:
modelName
- model name of the PandwaRF to checkhardwareRevision
- HW revision of the PandwaRF to checkcb
- : Callback to call when the background task is terminated
-
getLibVersion
abstract String getLibVersion()
- Returns:
the library version
-
getLibGitHash
abstract String getLibGitHash()
- Returns:
the library Git Hash version
-
getCurrentSoftwareVersion
abstract String getCurrentSoftwareVersion()
- Returns:
the current software version
-
getCurrentFirmwareVersion
abstract String getCurrentFirmwareVersion()
- Returns:
the current firmware version
-
getBatteryLevel
abstract void getBatteryLevel()
Read the current battery level
-
-
-
-