1

Did anyone have a successful experience on working with CompanionDeviceManager on Android? Especially, with the devices with Bluetooth Classic support. I've been testing a pretty simple app which tries to connect some device using Bluetooth Classic and I keep getting different strange errors. The problems I'm facing:

  • The internals of CompanionDeviceManager can crash with some nullpointer
  • The API uses onActivityResult mechanism and often I just get this callback with unsuccessful result (!Activity.RESULT_OK)
  • But most importantly, it takes way too long to discover a device

So, am I doing something wrong? Or this API is quite unstable?

Ov3r1oad
  • 1,057
  • 1
  • 12
  • 25
  • I see that on Android 11, the discover process will not time out for 93 seconds after being initiated. I keep up a spinner for 30 seconds, but sometimes it will actually discover a device after close to 90 seconds, leading to a very jarring experience. I have not experienced the first two bullet points you mention. But I did experience [this issue](https://stackoverflow.com/questions/71592175/companiondevicemanager-requestnotificationaccess-fails-on-android-12) – davidgyoung Mar 23 '22 at 18:22

0 Answers0