0

I had the same issue referred on this link. So to resolve the issue i did what klaus-donnert did,and also went here to download the latest plugin.... below is my xml file:

<preference name="phonegap-version" value="cli-6.4.0" /> 
<plugin name="cordova-plugin-mauron85-background-geolocation" spec="^2.2.5">
<variable name="ALWAYS_USAGE_DESCRIPTION" value="This app requires background tracking enabled to calculate the distance between you and Ecocompub partners" /> 
</plugin>

Next step was to test the app on my android, so after uploading the zip on phonegap.build, i read the qr code as usual, and .... the app crashed! it opens for a few seconds, but then closes...if i simply don´t use the plugin, the app runs well...does anybody experienced this problem?, i´m completely stuck.

Regards

Japa
  • 632
  • 7
  • 30

1 Answers1

0

So to help others that might have the same situation, the problem is NOT with the background mauron85 plugin, it was with my phonegap-plugin-push which was outdated since i was using cli-6.4.0...so if you want to use both plugins, you have to have on your xml file the following:

for background geolocation mauron85 plugin:

<preference name="phonegap-version" value="cli-6.4.0" />
<plugin name="cordova-plugin-mauron85-background-geolocation" spec="^2.2.5">
        <variable name="ALWAYS_USAGE_DESCRIPTION" value="set this value, otherwise apple will refuse your app" />
</plugin>

for push-plugin from here:

<plugin name="phonegap-plugin-push" spec="1.8.4" source="npm">

Regards.

Japa
  • 632
  • 7
  • 30