0

I am using NearBy 2.0 API version 'com.google.android.gms:play-services-nearby:12.0.1' with android things 'com.google.android.things:androidthings:1.0' to create a smart home app, but previously upto 8th may it was working fine with the build downloaded from android things console, but from yesterday it is throwing com.google.android.gms.common.api.ApiException:8007 STATUS_BLUETOOTH_ERROR. when I am starting advertisement or discovery whichever maybe. But if I use the previous build (image with apk) of 8th may it is working fine. I tried with that old apk also like new os image with old apk, found not working. In logcat I found it is unable to start listening for incoming connections.

I searched SO and google a lot but no solution worked. Even followed this Error codes in Nearby Connections 2.0 but no luck. I am using Raspberry PI 3 model B. Help!!

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
Koustuv Ganguly
  • 897
  • 7
  • 21

2 Answers2

1

Android Things 1 comes bundled with Google Play Services 12.5.20. Try updating your dependencies and see if anything changes.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • I tried with `11.6.2`,`11.8.0`,`12.0.1` and `15.x.x` all these versions of dependencies but no luck. But if I use the previous build (image with apk) of 8th may and on top of that if I install the app via android studio with any of the dependency version mentioned above it is working fine.! Hence , this is ok as long as I have that image(8th may),in case if I loose it then my development stops. Also because of this I cant test OTA update properly as Nearby is a vital part in my app. Please suggest ! – Koustuv Ganguly May 11 '18 at 04:04
  • I will look into the hardware configuration when creating the build in android things consol,cause I saw `UART UART0 (disables Bluetooth)` this I will change to `MINIUART` and if works will comment here. – Koustuv Ganguly May 11 '18 at 05:00
1

Finally I got it working , actually when I was configuring the hardware during the build preparation in android things console there I used Starter Kit configuration which by default configured UART as UART0 (disables Bluetooth) , hence the exception it was throwing com.google.android.gms.common.api.ApiException:8007 STATUS_BLUETOOTH_ERROR. during init of nearby where I was starting advertisement. So the fix is change the configuration of UART to MINIUART in android things console and create the build.

Koustuv Ganguly
  • 897
  • 7
  • 21