Package com.streamwide.smartms.lib.core.api.hardware.bluetooth

Types

Link copied to clipboard
interface BluetoothManagerListener

BluetoothManagerListener

Description :

This interface represent the API for all actions/event related to Bluetooth.
Link copied to clipboard
open class STWBluetoothManager

STWBluetoothManager

Description :

This class represent the API for all actions/event related to Bluetooth.


Example of use :

  • Implementation :
    
    STWBluetoothManager.getInstance().registerForBluetoothManagerEvents(context,
    private BluetoothManagerListener mBluetoothManagerListener = new BluetoothManagerListener() {
    
    public void onBluetoothAudioScoStateChanged() {
    
    //code
    
    }
    public void onBluetoothConnexionStatusChanged(boolean isConnected) {
    
    // code
    
    }
    public void onCheckExistConnectedDevice() {
    
    // if you use our module "swhardware" you can call the public method
    //  STWBLEManager.getInstance().checkConnectedDevices(context);
    
    }
    public BluetoothDevice getCurrentBluetoothDeviceConnected(){
    
    // if you use our module "swhardware" you can call the public method
    // return STWBluetoothClassicManager.getInstance().getCurrentBluetoothDeviceConnected(address)
    
    }
    });
    
  • Unregister :
    
            STWBluetoothManager.getInstance().unregisterForBluetoothManagerEvents(mBluetoothManagerListener);