How can I use an older version of Google Play Services?

I am using Google Cloud for messaging through Google Play services. The thing is, it only works on devices with the latest version of game services, and in other devices I need to show a dialog to send the user to google play to install the new version, which I really don't want to do!

So how can I avoid this ?! I'm trying to use an older version of game services (say from 2 years ago) to ensure that most of my users don't need to update, but that seems impossible for the classes and Android sdk as it has already removed the old versions! So what should I do? Is there a way to use older versions? and if find a way to use the old version is the newer versions compatible with the old ones?

I dont want my users to update because

  • GCM is not important for my application, although I love it!

  • This is over 30 MB, because there were many of my users in third world countries.

  • Google play is blocking some of my users from accessing Google Play due to international lows! and I have to do the update manually myself!
+3


source to share


2 answers


There is a solution for android studio:

1. Close your project

2. Navigate to the folder where your projects were saved

3. Go to the "application" folder and open the "build.gradle" file



  1. find this line:

    compile 'com.google.android.gms:play-services:7.3.0'

and change the version (here 7.3.0) to an older version (for example 6.5.87). You can find the available versions by looking at sdk / extras / google / m2repository / com / google / android / gms / play-services

5.run the project again

0


source


Unfortunately, Google Cloud Messaging was only added to the Services API in version 7.5, which was released in late May 2015 (see this post on the Android Developers blog ).

So, if you manage to find a copy of API v7.5 (see my question regarding this here ), or if @ Babak's suggestion above is safe (still researching this ... and you can only go down to 7.5.0, before than losing GCM support), you might get a few months, but that probably won't matter much ...



Actually, I just noticed that your question was also posted at the end of May ... So you probably won't be able to win anything. But you can reduce support for moving to a new version of the API later!

0


source







All Articles