christocracy / cordova-plugin-background-geolocation

Sophisticated, battery-conscious, cross-platform background-geolocation with motion-detection
http://transistorsoft.github.io/cordova-background-geolocation
492 stars 743 forks source link

'google is undefined' #223

Closed schlomm closed 8 years ago

schlomm commented 8 years ago

Hello, I've tried to test the provided Sample App on my Google Nexus 4 (Stock 5.1.1), but unfortunately I get the following error using Google Chrome's Web Inspector: backgroundgeolocation Of course it does also not work, when the smartphone is not attached to my computer...

Is there any point, which I have missed? Do I have to specify any 'google'-poperty? Would be awesome to get some feedback. All the best, Dominik

christocracy commented 8 years ago

SampleApp hasn't been upgraded to use new Cordova whitelist features.

You can either implement the whitelisting (to allow requests to maps.google.com) or disable whitelisting.

https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md

On Monday, August 3, 2015, Dominik notifications@github.com wrote:

Hello, I've tried to test the provided Sample App on my Google Nexus 4 (Stock 5.1.1), but unfortunately I get the following error using Google Chrome's Web Inspector: [image: backgroundgeolocation] https://cloud.githubusercontent.com/assets/3056292/9037644/a6bd3332-39ed-11e5-8491-6fb5aa6bdc49.PNG

Is there any point, which I have missed? Do I have to specify any 'google'-poperty? Would be awesome to get some feedback. All the best, Dominik

— Reply to this email directly or view it on GitHub https://github.com/christocracy/cordova-plugin-background-geolocation/issues/223 .

Snet form Gmail Mobile

christocracy commented 8 years ago

$ cordova plugin add cordova-plugin-whitelist

rebuild and run.

On Mon, Aug 3, 2015 at 6:18 AM, Chris Scott christocracy@gmail.com wrote:

SampleApp hasn't been upgraded to use new Cordova whitelist features.

You can either implement the whitelisting (to allow requests to maps.google.com) or disable whitelisting.

https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md

On Monday, August 3, 2015, Dominik notifications@github.com wrote:

Hello, I've tried to test the provided Sample App on my Google Nexus 4 (Stock 5.1.1), but unfortunately I get the following error using Google Chrome's Web Inspector: [image: backgroundgeolocation] https://cloud.githubusercontent.com/assets/3056292/9037644/a6bd3332-39ed-11e5-8491-6fb5aa6bdc49.PNG

Is there any point, which I have missed? Do I have to specify any 'google'-poperty? Would be awesome to get some feedback. All the best, Dominik

— Reply to this email directly or view it on GitHub https://github.com/christocracy/cordova-plugin-background-geolocation/issues/223 .

Snet form Gmail Mobile

Chris Scott Transistor Software http://www.transistorsoft.com

schlomm commented 8 years ago

Thanks :blush: Adding the Whitelist Plugin solved the problem that 'google' is undefined. Unfortunately I have another issue that the background geolocation is not called, but I think I will open a separate issue for this.