Using Google Play Services 7.x with Android 6 - android

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?

Related

<Your App> is having trouble with Google Play services.Please try again. Only on 4.4.X OS devices

We have an android app on Play Store for last 2 years. We are trying to connect the Google Drive API using play services inside the app.
Things are working fine for all the android OS except 4.4.X. In 4.4.X OS devices while trying to login to the Google Account most of the users are getting the error (as reported by them) like :
" is having trouble with Google Play services.Please try again."
Does anyone know how to fix this issue?. This is Not reproducing on all 4.4.X devices.
If you are having troubles with your virtual devices when running things like Google maps etc.; try creating a new virtual device with Google Play Store incorporated
On your Android phone, go to Settings.
Click on Apps.
Click Google Play services.
Click on Permissions.
Ensure all permission settings are turned on.
I've had the same issue as reported above after updating my app dependencies from com.google.android.gms:play-services-maps:15.0.1 to ..:16.1.0 (or ..:17.0.0). The problem for was that the installed version of Google Play Services on my device (a Zebra TC51 running Android 6.0.1 in this case) is rather old and is managed by our customer using a mobile device management solution (MDM) that is very conservative. Rolling back to ..:15.0.1 or updating Google Play Services to the latest version would both solve this issue for me. Sadly, I cannot force our customers to update Google Play Services (although I'd like them to update obviously).
Reproducing this is straightforward by just installing an older Google Play Services (download the July 2018 version for example, v12.8.74. Set your dependency to 16.0.1 or newer and you'll get the above error message.
I haven't been able to find an overview that lists the compatibility between versions of the installed Google Play Services APK and which versions of the com.google.android.gms:play-services-maps dependency are supported.
Also, have a look at the Overview of Google Play Services where it is explained how the included dependency (in your app) and the installed client library (on the device) depend on one another.
Make sure your Google Play Services is updated
For me worked: Settings > Apps and Notifications > Google Play Store > Permissions > All ON
I fixed this by following the instructions on setting up Firebase on a new project. I encountered the "Try again" prompt until I added firebase-core to the project.
Opening google maps once and the trying my map fixed the problem

Android Emulator stuck on "Google Play Services are Updating"

I recently began learning how to create Google Maps activities in Android app development, and have stumbled onto an issue with Google Play Services. Whenever I set my gradle build dependency to compile 'com.google.android.gms:play-services-maps:11.0.4', which is the most recent version of play-services-maps, the emulator screen gets stuck on the following view upon running my maps app:
I have allowed the app to sit there for over an hour, and nothing has changed or updated. As I've read in other StackOverflow questions, I can get the app to properly function by setting my gradle build dependency to an older version, such as compile 'com.google.android.gms:play-services-maps:9.0.0', but this limits my ability to use newer Android features and APIs in my apps, such as FusedLocationProviderClient.
I am running on Nougat 7.1.1, and have installed the following SDKs in an attempt to solve this Google Play Updating issue:
Android SDK Build-Tools
Android SDK Tools
Google Play APK Expansion Library
Google Play services
Support Repository > Google Repository
I haven't found any StackOverflow threads specific to this "Google Play services are updating" message. What can I do to resolve this issue?
Use API 24 or API 26 Android Emulator system images and you should be good to go. API 25 does not have the latest Google Play Store app pre-installed yet. Note on the screen shot that only these images are "Google Play" versions.
In addition to #Jamal Eason's answer, you may use Nexus 5 and Nexus 5X emulators which have Play Store. Check here. You may also try running on real android device connected via USB that supports google maps and having google play service installed.

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

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.

Do devices keep more than 1 version of Google Play services?

I updated one of my apps a few months ago to version 8.3.0 of Google Play services, and that version broke backwards compatibility for some location related APIs.
So my question is, if my device already had Google Play services 8.3.0 installed even when I was running my app using version 6.5.87, how is it possible that it was still working? (Given that the APIs on 6.5.87 are no longer available on 8.3.0) Do devices keep older versions of Google Play services to support backwards compatibility? Or are the removed APIs somehow available on the installed version of Google Play services and hidden on the library shared with developers?
What I'm trying to understand here is if updating Google Play services on my app actually brings background improvements to the app (like using the latest algorithms in the library), or if those improvements are already available as soon as the device installs the new Google Play services version.
EDIT:
After looking into this in more detail I saw that no APIs were actually broke, however some interfaces were converted into abstract classes (see https://developers.google.com/android/guides/releases#september_2015_-_v81) and that is what caused the compilation issues I had back then.
The issue I had happened because version 8.1 of Google Play services was no longer compatible with older versions (because of the change mentioned above), so all the libraries I was using had to be built with 8.1+, if one of them was built with an older version then the compilation failed with this error:
java.lang.IncompatibleClassChangeError: The method 'boolean com.google.android.gms.common.api.GoogleApiClient.isConnected()' was expected to be of type interface but instead was found to be of type virtual (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
EDIT 2:
Even though the issue I faced was not about removed APIs, I found an example of an API that was removed on Google Play services version 7: GooglePlayServicesClient (see Cannot resolve symbol 'GooglePlayServicesClient').
In the release notes of of Google Play Services 8.3 I don't see any note on API calls not available anymore. My guess is that the calls are just deprecated and not removed.
its not automatically available for your app
when update Google play service version you must have to update your app with new version of Google play service code only then your app have new algorithm
if your app have old version of Google play service & device have new version: don't worry your app works fine because your app already have Google play service code in your APK.(device don't keep old version code of Google Play service when update to new one).
if your app have new version of Google play service & device have old: then you must have to ask user update Google play service in his/her device then your app work fine in his/her device
so, its not necessary to device must have more then one version of Google Play service
EDITED: 12-01-2015
I already give you answer of this but still i w'll give you example
I have used Google play service(v 7.8.0) in my app for Location(com.google.android.gms:play-services-location:7.8.0) and for maps(com.google.android.gms:play-services-maps:7.8.0) and current Google Play service Version is 8.4.0 still my app working file why? because some of google play service code attach with my APP code see image below.
I have extract code from APK file. see Google play service code available with APK see package name com.google.android.gms that's why my app wok fine without any issue.
you can also generate your app code see this answer for more detail;

"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

Categories

Resources