Geolocation still wants Googleplay Service update


#1

Hi,
I’m trying to get the current geo location in one of my apps. I run into the problem, that my GooglePlay Service had to be updated (I’m using the emulator). After some searching installed the a new emulator image with the right GooglePlay Service installed and after some reinstalling I’ve got the nativescript-geolocation demo to run (asking me for permission and after granting it I’ve got the location).
Now I try to get my app running in the same emulator image. I still get the error message, that I need to update the GooglePlay Service. I tried to remove and add the java platform as well as adding and removing the geolocation plugin. I think I’ve gone through all options in the Manifest.xml but still haven’t found out, why the app still thinks it needs to update the Service. It’s probably just a switch somewhere, but I have no clue which one. Can somebody help me here?

Many thanks
Ralph


#2

First, it’s not recommended to use emulators to test hardware features, like GPS here.

Only few of the emulators from Google has play services built-in, make sure you use one of them. Your play services version should match the one used in plugin.


#3

Yes, I know. It took a while but I got the demo app from the geolocation plugin to run.
Strange thing is, that my app, which uses the same emulator image still asking for the update of the GooglePlay Service. The plugin demo runs fine in the emulator.


#4

DId you try to limit the Google Play Services Version in the app.gradle file? (https://github.com/NativeScript/nativescript-geolocation) <- Bottom of the Readme.md

android {
...
project.ext {
        googlePlayServicesVersion = "11.2.+"
    }
...
}

#5

Ahh, that did it. I was sure I had it copied but seemed to removed it again. Thanks a lot.