Question

I know that there are a lot of questions on this theme, but I couldn't found one that answers my question and I don't have device running Android Froyo to make tests, so I will ask...

My application supports android Froyo and above. Recently I needed to have Google AID in my app, so google play services for Froyo does not suit me any more. So I have updated the play services and get Google AID with this code:

 try {
      Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(context.getApplicationContext());
      xxx.setGoogleAdvertisingId(adInfo.getId(), adInfo.isLimitAdTrackingEnabled());
 } catch (IOException e) {
      // Unrecoverable error connecting to Google Play services (e.g.,
      // the old version of the service doesn't support getting AdvertisingId).
 }

In Android manifest I have the following:

<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

So my app will not crush on Froyo it will just not get the AID as I understand. But what will happen with other services? For example with GCM? will it work on Froyo? Or will the users get the dialog that their play services need to be updated?

As I understand google play services lib is not being packed in the APK, it is being used from the device. So what will happen on Froyo devices if I have used newer play services in my project? Does anyone have such kind of experience?

And if it will fail on Froyo by this way, what should I do? How can I integrate these two libraries in one project? Or I cannot and must release two separate APKs?

Any kind of information on this topic will be useful.

Was it helpful?

Solution

you will have to release separate apk's since you will not be able to put both the froyo version and the new version of google play services in the same project, you will get conflicting errors.

a better solution is to drop support for froyo since according to the latest numbers is only 0.7% of the market

https://developer.android.com/about/dashboards/index.html#Platform

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top