transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
659 stars 276 forks source link

App closing after calling configure #881

Closed agneshoving closed 5 years ago

agneshoving commented 5 years ago

Your Environment

this.bgGeo.configure({ debug: false, desiredAccuracy: 0, distanceFilter: 0, allowIdenticalLocations: true, disableElasticity: true, activityRecognitionInterval: 10000, stopTimeout: 5, disableStopDetection: true, locationUpdateInterval: 1000, disableLocationAuthorizationAlert: true, }, state => {

Expected Behavior

The app should ask for permission when configuring the plugin and not close the app.

Actual Behavior

When the configure function is called the app won't ask for permission to use the location. Instead the app wil close without an error. If you open the app again you will be prompted to give permission and the plugin works fine.

Context

The app i'm working on is quite old and needed some updating. I had problems with the cordova-google-plus plugin and installed cordova-android-play-services-gradle-release. That didn't solve my problem so I uninstalled the play-services plugin again. Since then the app closes once the bgGeo.configure method is called.

I have tried removing the Android platform and removing the plugin and adding them both again. Still didn't solve my problem. In logcat it looks like the plugin can't connect to the GooglePlayServices. Right after the "addLocationListener" log the app wil call onPause and move to the background. Do you have any idea how I could solve this issue or where I should look for a solution? I am aware that I should update my app to the latest versions but I wanted to do some quick bug fixes before updating the app.

Debug logs