Example usage for android.bluetooth BluetoothDevicePicker ACTION_DEVICE_SELECTED

List of usage examples for android.bluetooth BluetoothDevicePicker ACTION_DEVICE_SELECTED

Introduction

In this page you can find the example usage for android.bluetooth BluetoothDevicePicker ACTION_DEVICE_SELECTED.

Prototype

String ACTION_DEVICE_SELECTED

To view the source code for android.bluetooth BluetoothDevicePicker ACTION_DEVICE_SELECTED.

Click Source Link

Document

Broadcast when one BT device is selected from BT device picker screen.

Usage

From source file:com.google.android.car.kitchensink.bluetooth.MapMceTestFragment.java

void launchDevicePicker() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(BluetoothDevicePicker.ACTION_DEVICE_SELECTED);
    getContext().registerReceiver(mPickerReceiver, filter);

    Intent intent = new Intent(BluetoothDevicePicker.ACTION_LAUNCH);
    intent.setFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    getContext().startActivity(intent);//from w ww  .j  a  v  a 2 s . co m
}

From source file:com.google.android.car.kitchensink.bluetooth.BluetoothHeadsetFragment.java

void launchDevicePicker() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(BluetoothDevicePicker.ACTION_DEVICE_SELECTED);
    getContext().registerReceiver(mPickerReceiver, filter);

    Intent intent = new Intent(DEVICE_PICKER_ACTION);
    intent.setFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    getContext().startActivity(intent);/*from  w ww .  j  a  v  a 2 s  .  c  om*/
}