Example usage for android.bluetooth BluetoothDevice ACTION_UUID

List of usage examples for android.bluetooth BluetoothDevice ACTION_UUID

Introduction

In this page you can find the example usage for android.bluetooth BluetoothDevice ACTION_UUID.

Prototype

String ACTION_UUID

To view the source code for android.bluetooth BluetoothDevice ACTION_UUID.

Click Source Link

Document

Broadcast Action: This intent is used to broadcast the UUID wrapped as a android.os.ParcelUuid of the remote device after it has been fetched.

Usage

From source file:com.hmsoft.bluetooth.le.DeviceControlActivity.java

private static IntentFilter makeGattUpdateIntentFilter() { //
    final IntentFilter intentFilter = new IntentFilter();
    intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED);
    intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED);
    intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED);
    intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE);
    intentFilter.addAction(BluetoothDevice.ACTION_UUID);
    return intentFilter;
}

From source file:cz.tomsuch.lampicka.activities.LampActivity.java

/**
 * If user returns to this activity (or comes at first), we register
 * receiver, as it does nothing itself/*w  ww  . j  ava2 s.  c om*/
 * */
@Override
protected void onResume() {
    try {
        IntentFilter uuidsFilter = new IntentFilter(BluetoothDevice.ACTION_UUID);
        registerReceiver(uuidsReceiver, uuidsFilter);
        isReceiverRegistered = true;
    } catch (Throwable t) {
        t.printStackTrace();
    }
    if (device != null && serviceUuid != null) {
        connectToService();
    }
    super.onResume();
}