Find out if Google Play Services can't be updated - android

I have an app that is released and working great. Every now and then few users post me and say that the app requests them to update Google Play Services but Google Play doesn't show the update. This is because their device is no longer supported by the latest version of Google Play Services.
Is there any other way to determine if a device is supported by the version of Google Play Services which you are using, other than checking if the device runs Android 2.3 or higher? (2.3 or higher is quaranteed to have the latest version)

You can use PackageManager to get versionCode of Google Play Services installed on the device (if present):
int versionCode = getPackageManager().
getPackageInfo("com.google.android.gms", 0).versionCode;
and show Dialog to the user, but I'd personally do nothing about that. If the latest version of platform is 2.3 just set minSdk to 2.3 - that would eliminate users on older versions (which makes no difference as they would not be able to use your app anyway).
EDIT
If you care your pre 2.3 users then you can release separate app that is build against Google Play Services for Froyo.

Related

Are there any corelation between Android OS version and supported Google play services version?

Firebase Crashlytics has announced that it's going to remove its old version and we should use its new version SDK till november 15th on our androird app. To do so, we should also increase our minimum supported google play services version to at lease 16 which currently is 11.xx.xx.
So the question is what android devices don't support google play services v 16.xx.xx? I need to know this so I can estimate our users churn.
Are there any relations between minimum google play services version and Android OS version or Android API level or Device model?
Are there any relations between minimum google play services version and Android OS version or Android API level or Device model?
As with any other unknown app, just peek its Manifest. If there's limitation on sdk, it will be there as well.
So the question is what android devices don't support google play services v 16.xx.xx?
That's going to be an extremely long list of devices that are mostly no longer in use any more. It's probably not worthwhile to try to get this list, as it's going to take so much work to process what that means for you. It's probably better to take the advice of Android Studio (during new project configuration) when it says that "your app will run on approximately 99.8% of devices" when targeting api level 16. According to the documentation:
In general, devices running Android 4.1 (API level 16) or later and have the Google Play services app installed receive updates within a few days. This allows you to use the newest APIs in Google Play services and reach most of the devices in the Android ecosystem. Devices older than Android 4.1 or devices without the Google Play services app are not supported.
Are there any relations between minimum google play services version and Android OS version or Android API level or Device model?
Play services currently keeps itself up to date on all devices that target API level 16 or higher.
If you want to fully understand all the documentation details about the relationship between Play services and Android API levels, you should read the documentation. Play services doesn't target anything about specific devices or models. It is purely dependent on API level.

What is the correct version of Google Play Services needed for Firebase Performance Monitoring?

I'm trying to integrate Firebase Performance Monitoring on an application in which I have already successfully installed Firebase (in fact, I'm already using Crashlytics in this app).
The documentation states that in order to use Firebase Performance Monitoring, the device must have Google Play Services installed.
However, my problem is that I've found what appears to be a bunch of inconsistencies between the documentation and the actual version of Google Play Services available in the Play Store.
The prerequisites section of the documentation states:
Before you begin, you need a few things set up in your environment:
A device running Android 4.0 (Ice Cream Sandwich) or newer, and Google Play services 16.1.2 or higher
Also, further in that same page, it says:
Test your app using an Android emulator with a recent image and Google Play services 15.0.0 or later, or using a test device with Google Play services 15.0.0 or later.
On the other hand, the Play Store app on my device (running Android 6.0.1) shows that I have Google Play Services up-to-date, having version 13.2.80, updated on September 6th, 2018:
On top of that, APK Mirror shows that the most recent stable version to the date is 14.3.66, updated on October 3rd, 2018
Nevertheless, the official release notes show that there are no 13.2.80 or 14.3.66 versions and that starting on version 15.0.0, launched on April 12th (almost six months before 13.2.80!), they use SemVer with different versions for their different products.
So my question is: how do I get the correct version of Google Play Services needed for Firebase Performance Monitoring installed on my device?
Any clarifications on why this 13.2.80 version that I have installed or the 14.3.66 version provided in APK Mirror are not mentioned in the official release notes would be appreciated, too.
You have not got an update by Google on your device (6.0.1), latest versions of Android OS are updated to the stable version of Google play services 14.3.66. So you can test your application on emulators or any other devices.

Firebase: How can I ensure compatibility with various versions of Google Play Services?

I want to incorporate messaging/Push notifications in my Android App and since FCM is the newest version recommended, I just checked the Firebase prerequisites and it says,
Prerequisites
A device running Android 4.0 (Ice Cream Sandwich) or newer, and Google Play services 10.2.0 or higher
The Google Play services SDK from the Google Repository, available in the Android SDK Manager
The latest version of Android Studio, version 1.5 or higher
But, it isn't so that all the devices running ICS will have Google Play Services >= 10.2.0. Infact, this is the latest version of it. So, if I decide to go with FCM, all the devices having Play Services <= 10.2.0 will be out of my reach. If then I decide to bump the version down, Firebase doesn't seem to support any.
I want to use Firebase's and Google Play Services newest features and extend my support for devices running Google Play services >= 9.0.0.
This seems to be a fundamental problem with any library. Android provides Support library to mitigate this.
What is the recommended approach to support all these Play Services versions?
Just have the user update to the latest Google Play Services, by placing checkers. From the docs:
Apps that rely on the Play Services SDK should always check the device for a compatible Google Play services APK before accessing Google Play services features. It is recommended to do this in two places: in the main activity's onCreate() method, and in its onResume() method. The check in onCreate() ensures that the app can't be used without a successful check. The check in onResume() ensures that if the user returns to the running app through some other means, such as through the back button, the check is still performed.
If the device doesn't have a compatible version of Google Play services, your app can call GoogleApiAvailability.makeGooglePlayServicesAvailable() to allow users to download Google Play services from the Play Store.
Every device API 14 or higher (the new minimum SDK version as of 10.2.0) that has Google Play services is automatically upgraded to the latest version of Google Play services - in fact, a new version of the API only becomes available to developers when it is available on 100% of devices.

How to decide which version of Google Play services to use?

I am working on an Android application which supports Android version 14 and above. I have compiled my application against Android version 21.
I have used Google Play Services 7.0.0. The application works fine on Android 21. But when I run the application on Android version 19, it throws the following exception
Google Play services out of date. Requires 7095000 but found 6183036
So, I want to know what should be the version of Google Play that I should include in my application so that it works fine on Android 14 and above.
I think you are trying to find an answer to your question using a wrong approach.
The version of the Google Play Services that you want to include depends on the APIs your application implements. Picking a version based on the device you want to support will affect your application performance in a negative way.
Nearby Connections API, Places API are added in the Google Play services 7.0. If your application is using any of those or other APIs added in this version of Play Services then, these features may not work if you specify a lesser version in the Gradle files.
Similarly, Mobile Vision API, Nearby Messages were introduced in the Google Play Services version 7.8. There is no way you can implement them by including an earlier version of Play Services even if you want to support Android 2.3 devices.
Maps and Location Based Services services had been updated in many Play Services versions. Each update has added a small feature to it and improved overall battery efficiency, responsiveness. The version number you are using will affect the battery life ...
In every update to the Google Play Services existing versions, new APIs are released and old ones are improved. Consider the APIs your application is implementing then decide which version of the Play Services you want your users to update so that they can use your application smoothly.
Many Android users regularly update their Google Play Services. Even if the user has a KitKat device or Ice Cream Sandwich they could have updated their Google Play Services to the latest 7.8 version or to an intermediate version.
You can change the minimum sdk version in gradle(app) file to run your application in lower versions of android.

Cannot upload new APK to Google Play because of Google Play services version

I have minSdk set to 8 (Froyo) because of client's wish. Google Play won't allow me to upload new .apk. This is what it says:
Warnings
You uploaded an APK that uses Google Play services version 4030500. This will only work with Android API levels of 9 and above. It is discouraged to use this Google Play services version unless you have set the minSdkVersion in your manifest to 9 or higher.
Is there any chance to support versions older than Gingerbread?
Thanks in advance.
You have to use an older version of the Google Play Services to be Froyo compatible.
change in your build.gradle file to:
compile 'com.google.android.gms:play-services:4.1.+'
ps.: but I strongly advise in explaning to the client that Froyo is dead and gone and users that still have those devices are users that usually only make phone calls and SMS. They never go to Google Play to download new apps because their devices are too old and are not able to run any modern app properly.

Categories

Resources