Package 

Interface IThingBleOperator


  • 
    public interface IThingBleOperator
    
                        

    BLE operate manager. Provide basic ability of Normal BLE

    • Method Detail

      • clearLeCache

         abstract void clearLeCache()

        clear scan cache

      • startScan

         abstract void startScan(List<ScanFilter> filters, ScanSettings settings, PendingIntent callbackIntent)

        pendingIntent scan by Android system api

        Parameters:
        filters - see ScanFilter
        settings - see ScanSettings
        callbackIntent - see PendingIntent
      • stopScan

         abstract void stopScan(PendingIntent callbackIntent)

        stop pendingIntent scan

        Parameters:
        callbackIntent - see PendingIntent
      • connectBleDevice

         abstract void connectBleDevice(String address, LeConnectResponse response)

        Connect normal bluetooth devices, only physical connection, you can connect all Bluetooth devices.This type of connect returns only after the connection is successful

        Parameters:
        address - Bluetooth device address
        response - connect response LeConnectResponse
      • unregisterBleConnectStatus

         abstract void unregisterBleConnectStatus(String address)

        unregister normal bluetooth connection status monitoring.

        Parameters:
        address - device's address
      • disconnectBleDevice

         abstract void disconnectBleDevice(String address)

        disconnect normal bluetooth

        Parameters:
        address - device's address
      • isBluetoothOpened

        @Deprecated() abstract boolean isBluetoothOpened()

        is phone bluetooth open

      • openBluetooth

        @Deprecated() abstract boolean openBluetooth()

        open the phone bluetooth

      • closeBluetooth

        @Deprecated() abstract boolean closeBluetooth()

        close the phone bluetooth

      • isBleSupported

         abstract boolean isBleSupported()

        Does the phone support Bluetooth

      • getBondState

         abstract int getBondState(String mac)

        Get Bluetooth binding statusBOND_NONE = 10BOND_BONDING = 11BOND_BONDED = 12code = -1 ,maybe no bluetooth connect permission

        Parameters:
        mac - device's address
      • createBond

         abstract void createBond(String deviceMac, IResultCallback response)

        Start the bonding (pairing) process with the remote device.

        This is an asynchronous call, it will return immediately. Registerfor ACTION_BOND_STATE_CHANGED intents to be notified whenthe bonding process completes, and its result.

        Android system services will handle the necessary user interactionsto confirm and complete the bonding process.

      • removeBond

         abstract void removeBond(String deviceMac, IResultCallback removeBondResponse)

        Remove bond (pairing) with the remote device.

        Delete the link key associated with the remote device, andimmediately terminate connections to that device that requireauthentication and encryption.

        Parameters:
        deviceMac - device's mac