What Google Play Services version is needed for AppInvites to run? - android

I am trying to set up App Invites beta library in my application.
The guide suggests to add this dependency:
compile 'com.google.android.gms:play-services:8.4.0’
with 8.4 being the latest version, but actually I want to stick with v. 7.8 (or so) for a while, because in my experience lots of devices are still below, and if they install my app they’ll be asked to update their play services. Nothing wrong, but I just want to stick with that version for a while.
I couldn’t find any info about that on the official docs.

AppInvites was first released in Play Services 8.1. It received a fairly significant update in 8.4, but before that it didn't change much from what I can tell.

Related

Xamarin Android: Google Pay integration and Play Service 16.0.0.0

So in the Google pay integration with Android, Google says that devices should have play services 16.0 or more. But so far I can only find version upto 14.X.
What gives? has anyone ran into this issue?
I am using Stripe for integration. For some reason, I am getting this exception:
Android.Gms.Common.Apis.ApiException: 10:
then bunch of anonymized classes.
If you check the currently available version of GooglePlayServices on maven it is 16.1.2
But if you check NuGet for Xamarin.GooglePlayServices with pre-release enabled the latest version available is 70.1501.0-preview2 which if I am not wrong targets the maven version 15.0.1 and since I could not find any release notes in regards to when will be the latest GooglePlayServices NuGet would be released I would suggest you will have to wait until it is released.
A quick question though why do you need the latest GooglePlayServices I am pretty sure it is not needed for Google Pay integration.
As G.hakim points out, you need a version that supports Google Pay, not necessary the latest, although it's recommended to inspect and update the version of the libraries you typically use.
Google Pay specific logs are shared at a system level. That is, you need remove the filter in the logs to show all logs. If you then filter the output with the term "wallet" you should be able to find elements of the type WalletMerchantError that provide more details about the specific problem in your configuration / setup.

What is google play-service distribution in android devices version wise?

Just like Android give android version distribution worldwide?
I want same way google play-service distribution.
On the website, Google mentioned the only year of release.
Actually, we are using google map in our app so we wanted to confirm what should be our minimum play-services version so that it should work even if the user has not updated play-services.
My app minimum version is 15.
Afaik there is no official maintained distribution information like for the different Android OS versions.
But there are some hints about the distribution:
In 2014, Sundar Pichai made an official statement about the play services in the Developers keynote:
"Google Play Services ships every six weeks and 93% of our users are on the latest version of Google Play services across all versions of Android. In fact by shipping every six weeks we can, in many ways, iterate faster than the typical OS release cycle."
You can watch that on youtube, at around minute 45 and 35 seconds.
Since the play services are updated by the Playstore itself without requiring further interaction or confirmation of the user, I think you can assume that most users are quite up-to-date. So if you set the minimum required version to a version that was released some months ago you should include most of the users.

Using Google Play Services 7.x with Android 6

We upgraded to Google Play Services 8.1 the moment it was out, but now we're considering using a third party library which still has a 7.8 dependency: it hasn't made the required upgrade mentioned here.
Reading over the announcement for Google Play Services 8.1 there is a mention that
If your app is using Google Play services SDK versions prior to 8.1, you must update to use this new version to ensure your app is fully compatible with Android 6.0. This will enable you to manage the permission flows appropriately for your app and avoid any potential connection issues.
Potential connection issues sounds like GCM might stop working, but I haven't found any documentation saying what would actually happen if an Android 6 device tried to use Google Play Services 7.x. Has anyone else run into this? Are there any connection issues that I should be concerned about?

"This app won't run unless you update Google Play Services" when app is installed on real device

When I install my app on Android devices running older versions (for example 4.4.4), I get this message. All the other posts I can see relating to this message seem to be when running on the emulator and related to Google Maps API. I am using Google Play Service 7.0.0.
This android developer's blog entry describes what's new in the version 7.0 of Google Play services.
If you don't need those you're good to go with version 6.5 which already uses new GoogleApiClient class and provides granular dependency modules (best described here and here.
In one of my projects i use this
compile 'com.google.android.gms:play-services:6.5.87'
It's the whole package and I'll pick only the modules I need before deployment. Works fine against target API 22.
The farthest version I'd go with would be
compile 'com.google.android.gms:play-services:6.1.71'
This one introduced the unified GoogleApiClient approach used today.
So should I use an older SDK?
Absolutely not, this is not an SDK related problem. Keep everything (build tools, compile SDK, target SDK) to 22.
is there a better way to handle this than asking my users to update their Google Play Services?
See above, use older version of the library with your project.
"This app won't run unless you update Google Play Services" when app is installed on real device
You get this message on your phone because your device has low version of google play service compared to the one used in the app.
Updating it, will work properly

Maximizing Google Play Services Backwards Compatibility

What are the recommended practices for maintaining the widest backwards compatibility of an Android app while depending on Google Play Services?
The developer implementation documentation for using Android Studio indicate compiling against v5.+
compile 'com.google.android.gms:play-services:5.+' which with the available downloads I'm using seem to end up using version 5208000. At which point I get errors and warnings returned while testing an application:
W/GooglePlayServicesUtil Google Play services out of date. Requires 5208000 but found 5089036
E/GooglePlayServicesUtil GooglePlayServices not available due to error 2
Admob, my dependency on Google Play Services, appears to work normally however. If you follow the Google recommendation to call isGooglePlayServicesAvailable() and GooglePlayServicesUtil.getErrorDialog(), the user is told an upgrade is required for the app to work and sent to the store where there is no update available.
In other places maintaining backwards compatibility means compiling against the oldest API version that supports the features you need. So I tried with v4 compile 'com.google.android.gms:play-services:4.+' which generated another error:
E/GooglePlayServicesUtil﹕ The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
Searching around indicates this is a false report and can be ignored.
If I compile against a newer API version and it's not present on the device will things work? Or do I have to coax users into upgrading? Is it better to compile against an older API version and assume that things are properly backwards compatible with newer versions running on devices?
I'm the developer of an SDK that optionally depends on Google Play Services, and my approach has been, as you mentioned, to compile against the oldest version of Google Play Services that contains the APIs that I need, such that downstream clients won't into issues like these.
If the APIs that you need are available in v4, it's safe to compile against com.google.android.gms:play-services:4.+, and to follow Google's directions to show a prompt to a user to upgrade. Users will only see the upgrade dialog if they're running an older version of v4, or if they're somehow still on v3. In either case, the upgrade dialog should correctly lead them to the Play Store, where there will indeed be an upgrade available.
If the APIs that you need are only available in v5, do not use a wildcard version (ie 5.+). You should compile against an older version that is likely to be widespread, such as com.google.android.gms:play-services:5.0.89. Using a wildcard means you'll compile against the very latest version of Google Play Services that you've installed in the Android SDK manager, on whatever computer/environment you happen to be compiling on, which to me just feels wrong - I don't care if it's Google building the library, I like to know exactly what I'm compiling into my app.
Moreover, with a wildcard, if you always keep your SDK manager updated, whenever you compile the release version of your app and then push it to Google Play, you may have just shipped an app against a version of Play Services that isn't widespread, or worse - isn't even available for download on every device yet, in which case users will get the dialog and not be able to upgrade, as you've seen during development.

Categories

Resources