1

I am trying to implement google play location services in my android app. I have followed this tutorial

It does not works on some devices. The google api client does not connects. It always goes to the callback method onConnectionFailed.

I am using Android Studio and in the gradle file, I have added the following line:

compile 'com.google.android.gms:play-services-location:7.8.0'  

So far I have found is that the version mentioned in the project (7.8.0) is more than the play services version installed in the device (7.5.71). So, it goes to the callback onConnectionFailed with the error code 2.

On changing the version in gradle file from 7.8.0 to 7.5.0, it works fine in these devices also.

So, is there any workaround so that I will be able to use the latest version and still be able to run it without any problem in the devices which does not have the latest version?

Deividi Cavarzan
  • 10,034
  • 13
  • 66
  • 80
binay37
  • 121
  • 1
  • 11
  • No, there is no workaround. The device will always need to have at least the viersion that your app is compiled with, no exceptions. The only thing to do is prompt the user to update. See here: http://stackoverflow.com/a/31529430/4409409 – Daniel Nugent Nov 25 '15 at 19:52

1 Answers1

0

Google Play Services updates on its own in the background. If the device has not yet been updated to the latest version, you can show a prompt instead and ask the user to update it manually by opening Google Play Services on Google Play

jomartigcal
  • 813
  • 1
  • 6
  • 11