Search code examples
javaandroidandroid-source

AOSP and access to Google Play Services


I am developing for a device that uses AOSP (https://source.android.com/). This device is a Garmin 780 (https://buy.garmin.com/en-US/US/p/569748). The custom build does not include any Google Apps.

I'm new to Android dev, so I'm a bit lacking in the ecosystem knowledge.

I was hoping that someone could explain to me how the OS would handle having an application installed which uses some of the Google Play Services API's (e.g. https://developers.google.com/android/reference/packages).

I've installed an APK that uses:

com.google.android.gms:play-services-analytics com.google.android.gms:play-services-auth

The application runs. I would have thought that it would fail to run if the libraries were not present. Or are they bundled with the apps APK?

When using the Device File Explorer in Android Studio and checking out the folder /data/data I can confirm that no com.google.android packages are installed.

So I'm really after some confirmation, the way Google Play Services is described here: https://developers.google.com/android/guides/overview seems that Google Play Services must be installed on the device at an OS level in order to make use of them. These services cannot be installed alongside a custom application like normal dependencies right?


Solution

  • That is correct Google Play Services cannot simply be installed for use along with an application.

    Google Play Services is a suite of APIs installed by default on most Android devices to allow for apps to easily utilize common features as well as keep the services and Google apps up to date.

    Something that might interest you is Open Gapps. It is a way for devices with custom Android ROMs to utilize the Google Play Services package.