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.
Related
This is my first time submitting an app to the Google Play store, so I'm not very experienced with the process at all. After struggling for a bit to get it to build correctly, I was finally able to upload an app bundle and send it in for review. A few minutes later I got an email saying my app was "vulnerable to Intent Redirection" and recommended the following article for support: https://support.google.com/faqs/answer/9267555. The problem is I don't understand much of what the article is saying! As far as I know, I haven't messed with anything like this. I've only downloaded the base NDK and SDK stuff from Unity Hub, and I haven't changed any of the code in Android Studio at all. I asked Google for support, and they said:
"We’ve identified that your app is using the AliPay SDK or library, which facilitates the transmission of phone number information without meeting the prominent disclosure guidelines. If necessary, you can consult your SDK provider(s) for further information or please upgrade AliPay SDK version to 15.5.5 or higher."
Please help! Is there an easy fix to this that I'm missing somehow? I don't even know what AliPay is, as I said I'm a total beginner here. In case it's useful info to have, I'm using Unity 2019.2.13f1 on a Macbook Pro running High Sierra 10.13.6.
Well, do what the message says "upgrade AliPay SDK version to 15.5.5 or higher".
Just go to Android Studio and open your build.gradle file then update that lib version. It will be marked with a yellow line, that means that lib has an update. Focus on that line, then do Alt + Click then Enter, now sync and you've done. Upload the new apk.
Got this warning while publishing the app:
We’ve detected that your app is using an old version of the Google Play Developer API. From December 1 2019, versions 1 and 2 of this API will no longer be available. Update to version 3 before this date.
https://android-developers.googleblog.com/2019/03/changes-to-google-play-developer-api.html
I'm wondering why I got this warning as I'm not using Google Play developer API explicitly.
Can anyone tell me what does it mean and how to update it to v3?
The above link is not enough to solve the issue.
Upgrade every library to it's latest version already!!
Here is the snap of libraries I've used
I had the same problem. I had to update google-services.
See https://firebase.google.com/support/release-notes/android#2019-08-22 : "The google-services plugin for Android (v4.3.1) is now available. This release removes calls to a deprecated API. For more information, refer to the Firebase Android SDK Release Notes."
Hope this helps you!
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.
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
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.