Updating play services without reducing minSdkVersion

android android-gradle-plugin google-play-services build.gradle

36 观看


479 作者的声誉

I use the following play services library in my android project. play-services-location,play-services-auth and play-services-gcm. The library are in version 9.2.0.I have the minSdkVersion as 9.

I recently added the VerifyApps API into the project and in order to use that library properly I had to add a new dependency com.google.android.gms:play-services-safetynet:11.6.0. When I added it, android studio asked to enter some class paths in myAndroidManifest file or else I had to improve my minSdkVersion to 14. After adding it some of the functionalities provided by the authAPI started acting up throwing some runtime exceptions in devices running Android 5.0 and above.

I upgraded my Auth and GCM API to version 11.6.0. Android studio again asked me to enter some more class paths in AndroidManifest file. After this the app is working fine but I came across this doc. According to this doc if I am using a play-service version greater than 10.2, my app will not work on devices below 4.0 (Correct me if I am wrong, But a careful look at the wordings lead me to believe that only the support is stopped but existing API calls will work just fine). But I am not using the full play-service dependency in my project I am just the aforementioned 4 libraries, so by adding the suggested entries in the AndroidManifest files should let my app to work just fine in devices below version 4.0 right?

If the functionalities are not fully supported then, is there a list of functionalities that will be affected by upgrading to this version?

作者: Nirmal Raj 的来源 发布者: 2017 年 12 月 27 日

回应 (1)


45646 作者的声誉

You can create a special flavor for older platforms, and use it with an older version of gms. You will deploy the two flavors as split APKs to Play Store.

作者: Alex Cohn 发布者: 05.02.2018 01:18