Android app which interacts with BLE devices not w

2019-03-31 18:25发布

I have an Android app which interacts with custom BLE devices. This app works as expected on devices which have android version 4.4 to 6.0. Now I want to make this available on Chromebooks through the Google Playstore on Chromebooks(App Runtime for Chrome).

I installed this app on my Google Asus Flip Chromebook(Chrome OS version 55, ARC version 3617689) by sideloading the APK onto it. But it is not working as expected.

These are the steps I took:

  1. Call a startLeScan() which gives the BluetoothDevice as a scanResult.
  2. Call the connectGatt() method, and the device is connected and in the onConnectionStateChange() callback, get a handle to the BluetoothGatt.
  3. Call the discoverServices.
  4. After that, the onServicesDiscovered() callback is hit as expected with status = GATT_SUCCESS. However gatt.getServices returns an empty list when running on Chromebook. When running on Android device (API 19 to API23) I get BluetoothGattService handles to all the services supported by my BLE device.

Which leads me to suspect the BLE implementation on ARC on Chromebook. Has anybody else faced this issue? Is anyone using Android BLE APIs on Chrome OS?

1条回答
Melony?
2楼-- · 2019-03-31 19:09

I've having the same trouble, and it appears to be a deficiency with the BLE implementation on Chromebooks. Although there isn't a fix or workaround, the issue is being tracked at https://bugs.chromium.org/p/chromium/issues/detail?id=722987

查看更多
登录 后发表回答