1

I've stumbled upon a little barrier when trying to get the location of a user. While trying the code in the emulator, I can get location coordinates and everything works perfectly.

However on my real phone (Samsung galaxy s4 with latest updates), the android studio run-monitor gives me the following message:

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9683000 but found 8122238
I/AdressPopup: Location services connection failed with code 2 

(AdressPopup being my classname where this occurs). No coordinates and thus no location can be acquired as such.

I have the latest build for google play services specified in my build.gradle (module: app) file:

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

Any ideas on what might be causing this problem?

Jazzbaron
  • 75
  • 11
  • Go to the Settings->Apps first and check installed Google play services version. Is it the latest? BTW, there are a lot of similar questions are placed on stackoverflow, here you can find the solution - http://stackoverflow.com/questions/22493465/check-if-correct-google-play-service-available-unfortunately-application-has-s – Sergey Trukhachev Oct 04 '16 at 15:03
  • All I can find is google-play-services: 33, which isn't even installed apparently. I have now installed it. My problem still persist though and that link you posted didn't get me anywhere either. For instance, adding the lines: `` did not do anything. – Jazzbaron Oct 04 '16 at 16:59

1 Answers1

0

So apparently the problem was my specific targeted device. After I updated the google maps app on my phone and ran an update on the google play store (although I'm not sure if the latter was necessary), the location function in my app started working.

I hope this helps anyone who stumbles upon the same problem.

Jazzbaron
  • 75
  • 11
  • 1
    App should not start in case support library\maps\something required is not up to date. In that case you should check these versions right in the code and if only everything is ok you should allow to go further, otherwise your app should show a dialog with the update requirements. – Sergey Trukhachev Oct 05 '16 at 08:40
  • 1
    Indeed. Implementing a fix to this is my next step. – Jazzbaron Oct 05 '16 at 08:47