Example usage for android.bluetooth BluetoothMapClient ACTION_MESSAGE_RECEIVED

List of usage examples for android.bluetooth BluetoothMapClient ACTION_MESSAGE_RECEIVED

Introduction

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

Prototype

String ACTION_MESSAGE_RECEIVED

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

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);
}