Example usage for android.bluetooth BluetoothMapClient ACTION_CONNECTION_STATE_CHANGED

List of usage examples for android.bluetooth BluetoothMapClient ACTION_CONNECTION_STATE_CHANGED

Introduction

In this page you can find the example usage for android.bluetooth BluetoothMapClient ACTION_CONNECTION_STATE_CHANGED.

Prototype

String ACTION_CONNECTION_STATE_CHANGED

To view the source code for android.bluetooth BluetoothMapClient ACTION_CONNECTION_STATE_CHANGED.

Click Source Link

Usage

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

@Override
public void onResume() {
    super.onResume();

    mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
    mBluetoothAdapter.getProfileProxy(getContext(), new MapServiceListener(), BluetoothProfile.MAP_CLIENT);

    IntentFilter intentFilter = new IntentFilter();
    intentFilter.addAction(BluetoothMapClient.ACTION_MESSAGE_SENT_SUCCESSFULLY);
    intentFilter.addAction(BluetoothMapClient.ACTION_MESSAGE_DELIVERED_SUCCESSFULLY);
    intentFilter.addAction(BluetoothMapClient.ACTION_MESSAGE_RECEIVED);
    intentFilter.addAction(BluetoothMapClient.ACTION_CONNECTION_STATE_CHANGED);
    getContext().registerReceiver(mTransmissionStatusReceiver, intentFilter);
}