Android Bluetooth development - MAP protocol (8)

SDK path: frameworks/base/core/java/android/bluetooth/

Service path: packages/apps/Bluetooth/src/com/android/bluetooth/

        This class cannot be found when using the protocol class, because the Client part or related interfaces of the Bluetooth protocol in the Android source code are hidden by @hide, so android.jar cannot meet the needs of Android source code framework layer developers. Reflection mechanism or reference framework.jar instead of android.jar.

位置:out\target\common\obj\JAVA_LIBRARIES\framework_intermediates\classes.jar

1. SDK interface

         BluetoothMapClient.java: The proxy class of the MAP protocol in the Bluetooth apk, and the application accesses the method of the MAP protocol through this proxy class.

interface name describe
connect Connect to specified device
disconnect Disconnect the designated device
isConnected Determine whether the specified device is connected, and return true if connected, otherwise false
getConnectedDevices Get a list of connected devices
getDevicesMatchingConnectionStates Get a list of devices in a specified state
getConnectionState Get the status of the specified device
setPriority

Guess you like

Origin blog.csdn.net/c19344881x/article/details/128733121