Class SimpleGollumDongle

  • All Implemented Interfaces:

    @Deprecated() 
    public abstract class SimpleGollumDongle
    
                        

    SimpleGollumDongle is the main class of API.

    This class is a singleton

    • Constructor Detail

      • SimpleGollumDongle

        SimpleGollumDongle()
    • 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.

      • getLastVersionNordic

         abstract void getLastVersionNordic(String modelName, String hardwareRevision, GollumCallbackGetString cb)

        Get the last version of nordic

        Parameters:
        modelName - model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        cb - : Callback to call when the background task is terminated
      • getBatteryLevel

         abstract void getBatteryLevel()

        Read the current battery level