Vidya Sagar
Vidya Sagar

Reputation: 180

Can I use Nearby google API on raspberry running on android things?

I am trying to use Nearby API on raspberry pi3 running on google things. I am able to connect to GoogleApliClient but when trying to advertise, the following error has been shown

17: API: Nearby.CONNECTIONS_API is not available on this device.

I am wondering if I can use this api or not.

I found a piano app on GitHub which uses this api on raspberry pi running on a android things. I couldn't figure out how to proceed forward. Please help.

Upvotes: 0

Views: 1301

Answers (1)

Nick Felker
Nick Felker

Reputation: 11968

Google Nearby is available on Android Things. There are a number of reasons why this may not be present for you.

  1. Your system image that you installed does not have Google Play Services.

  2. Your app's build.gradle is using the incorrect version of Google Play Services. As of DP6, you should use 11.6.0

  3. Your code is doing something that is out-of-date. You can refer to the official documentation for getting it set up on Android devices. Android Things uses that same API.

If you are looking for another sample, you can look at the official Robocar project which also uses the Nearby API.

Upvotes: 2

Related Questions