cordova-plugin-background-geolocation: Plugin crashes the App in Android platform

Your Environment

  • Plugin version: 2.2.5
  • Platform: Android
  • OS version: Android 6
  • Device manufacturer and model: Asus Selfie
  • Cordova version (cordova -v): 6.4.0
  • Cordova platform version (cordova platform ls): android 6.0.0
  • Plugin configuration options:

{ desiredAccuracy: 100, stationaryRadius: 100, distanceFilter: 100, maxLocations: 1000, stopOnTerminate: false, // Android only section locationProvider: backgroundGeolocation.provider.ANDROID_ACTIVITY_PROVIDER, interval: 60000, fastestInterval: 5000, activitiesInterval: 10000, notificationTitle: "Nearby promotions notifications active.", notificationText: "We will notify you of nearby promotions.", notificationIconColor: "#002661", notificationIconSmall: "icon_small", notificationIconLarge: "icon_large", // iOS only pauseLocationUpdates: false }

Context

I have build an app which was working as expected with your plugin but after update in Android studio it crashes the app. When I install the app with this plugin it always says “Unfortunately [App name] has stopped”. Without your plugin the app runs as expected. Please help.

This is what I have in Android SDK Manager

screen shot 2017-02-18 at 1 45 26 pm

Steps to Reproduce

  1. Build app with your plugin
  2. Configure your plugin and call the function backgroundGeolocation.start();
  3. It will crash the app with message “Unfortunately [App name] has stopped”

Debug logs

This is the logcat output. App ID is com.sirkle.app logcat.txt

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Most upvoted comments

I resolved with an update of the “phonegap-plugin-push”, because “phonegap-plugin-push” updated from “com.google.android.gms:play-services-gcm:9.8+” to “com.google.android.gms:play-services-gcm:10.2+” and resolved

The stacktrace of the error is practically the same than this one: https://stackoverflow.com/a/41140199

Besides what mauron85 has said, check that answer (and the accepted one) and see if it helps you. Good luck 😃