Example usage for android.bluetooth BluetoothProfile MAP_CLIENT

List of usage examples for android.bluetooth BluetoothProfile MAP_CLIENT

Introduction

In this page you can find the example usage for android.bluetooth BluetoothProfile MAP_CLIENT.

Prototype

int MAP_CLIENT

To view the source code for android.bluetooth BluetoothProfile MAP_CLIENT.

Click Source Link

Document

MAP Messaging Client Equipment (MCE)

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