Gavin Williams
Gavin Williams

Reputation: 41

Are Google Play Services Supported on Android Things?

I'm developing an app for Android Things and want to use Nearby from Google Play Services to communicate with my IoT device across Android and iOS.

I've compiled the app, but am getting a message that it's not supported on my device, however, the Android Things website clearly states that there is support for it.

I'm using the sample code provided by Google here with no modifications other than adding my API key https://github.com/googlesamples/android-nearby/tree/master/messages/NearbyDevices.

My device is a Raspberry Pi 3 model B and I'm using the latest release of Android Things.

Upvotes: 1

Views: 1671

Answers (3)

Doug Stevenson
Doug Stevenson

Reputation: 317497

Play services (and Firebase) is supported (to some degree) by Android Things. It doesn't self-update like it does on normal Android devices. When you develop against a version of Android Things, you should understand which version of Play services you're working with, so you can use the correct version of the client libraries.

You can find out the version of Play services on the release notes page. You can find out which parts of Play services and Firebase are supported on this page.

Upvotes: 0

Prasaanth Selvakumar
Prasaanth Selvakumar

Reputation: 21

Try using google services version as 11.0.2 It worked for me If we specify a higher version it asks us to update So in the gradle file in dependencies change

implementation 'com.google.android.gms:play-services-maps:X.X.X' where X.X.X is your version to implementation 'com.google.android.gms:play-services-maps:11.0.2'

Upvotes: 0

Gavin Williams
Gavin Williams

Reputation: 41

I updated the sample code to use Play Services version 10.0.0. Everything works now!

Upvotes: 1

Related Questions