3

I'm using Google Cloud messaging through google play services. The things is it only works on the devices with last version of play services installed, in remaining devices i need to show a dialog to send user to google play to install new version witch i really don't want to do!

So how can i avoid this?! I'm trying to use an older version of play services (lets say from 2 years ago) to insure majority of my users don't need to update but it seems impossible with grade and android sdk since it already deleted older versions! So what should i do? Is there any way to use older versions?! and if do find a way to use an older version are newer versions compatible with older one?

I don't want to force my users to update because

  • GCM it's not essential to my app although i like to have it!

  • It's over 30 MB witch is a lot in third world countries were my users are.

  • Google play blocks some of my users from accessing google play due to international lows! and i have to do update manually my self!
Alireza Ahmadi
  • 5,122
  • 7
  • 40
  • 67

2 Answers2

0

There is a solution for android studio:

1.Close your project

2.Browse to the folder where your projects has been saved

3.Go to folder 'app' and open the file 'build.gradle'

  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 one (like 6.5.87). You can find out available versions by looking at sdk/extras/google/m2repository/com/google/android/gms/play-services

5.open the project again

Babak
  • 1
  • 1
0

Unfortunately Google Cloud Messaging was only added to the Play Services API in version 7.5, which was released end of May 2015 (see this Android Developers Blog post).

So, if you manage to find a copy of the v7.5 API (see my question regarding that here) or if the suggestion above by @Babak is safe (still investigating that one... and you can only go down to 7.5.0 before you lose GCM support), you might be able to gain a few months, but it will likely not make a huge difference...

Actually, I just noticed that your question was also posted end of May... So you probably won't be able to gain anything. But you may reduce support of you move to a new API version later!

Community
  • 1
  • 1
Markus A.
  • 12,349
  • 8
  • 52
  • 116