0

I have a newbie question about Bluetooth:

If I connect my Android phone to a medical device with Bluetooth (or Bluetooth LE) Interface, is there a way to have an application automatically started?

I have used a Broadcast Receiver in my application to monitor the "ACTION_CONNECTION_STATE_CHANGED" notification. I can use it to start my application but we succeeded to get it work only with a HID Profile (which is supported natively by Android). We didn’t succeed with a Health Device Profile.

Is it something feasible?

Thanks

OlivierGrenoble
  • 3,803
  • 2
  • 18
  • 25

1 Answers1

0

https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration

Health Device Profile is deprecated from API level 29. New apps should use Bluetooth Low Energy based solutions such as BluetoothGatt, BluetoothAdapter#listenUsingL2capChannel(), or BluetoothDevice#createL2capChannel(int)

  • It is hard to find L2CAP examples. The following link indicates that it doesn't seem functional at that time: https://stackoverflow.com/questions/51614736/how-can-i-instantiate-a-l2cap-socket-in-android – OlivierGrenoble Sep 30 '19 at 08:28