Simulation Bluetooth HID Device(Mouse/Keyboard) for Android,Support 「Android、iOS、Windows...」
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
bluetoothAdapter.getProfileProxy(context, mProfileServiceListener, BluetoothProfile.HID_DEVICE);
// SUBCLASS1_COMBO = MOUSE+KEYBOARD
BluetoothHidDeviceAppSdpSettings sdp = new BluetoothHidDeviceAppSdpSettings(HidConsts.NAME, HidConsts.DESCRIPTION, HidConsts.PROVIDER, BluetoothHidDevice.SUBCLASS1_COMBO, HidConsts.Descriptor);
mHidDevice.registerApp(sdp, null, null, Executors.newCachedThreadPool(), mCallback);
System Setting -> Accessibility -> Touch -> AssistiveTouch
In the process of my use, I found that there are some models cannot connect properly, and this situation needs to modify the corresponding configuration file in the Android system diagram.