Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: BackgroundGeolocation - Plugin not Installed #258

Closed
jgw96 opened this issue Jul 1, 2016 · 26 comments
Closed

bug: BackgroundGeolocation - Plugin not Installed #258

jgw96 opened this issue Jul 1, 2016 · 26 comments

Comments

@jgw96
Copy link

jgw96 commented Jul 1, 2016

From @DaniloCouto on June 30, 2016 20:42

Type: bug

Ionic Version: 2.x

Platform: android 5.0 webview

BackgroundGeolocation methods returns 'Plugin not Installed' whenever I use.
Ionic info
Cordova CLI: 6.2.0 Ionic Framework Version: 2.0.0-beta.9 Ionic CLI Version: 2.0.0-beta.32 Ionic App Lib Version: 2.0.0-beta.18 OS: Node Version: v5.6.0

Ionic plugin ls

cordova-plugin-compat 1.0.0 "Compat" cordova-plugin-console 1.0.3 "Console" cordova-plugin-device 1.1.2 "Device" cordova-plugin-geolocation 2.2.0 "Geolocation" cordova-plugin-mauron85-background-geolocation 2.1.2 "CDVBackgroundGeolocation" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 2.1.3 "StatusBar" cordova-plugin-whitelist 1.2.2 "Whitelist" ionic-plugin-keyboard 2.2.1 "Keyboard"

ionic platform ls
Installed platforms: android 5.1.1

Copied from original issue: ionic-team/ionic-framework#7147

@jgw96
Copy link
Author

jgw96 commented Jul 1, 2016

Hello! Thanks for using Ionic! Are you using ionic-native when you get this error?

@jgw96
Copy link
Author

jgw96 commented Jul 1, 2016

From @DaniloCouto on July 1, 2016 13:32

Hello,
Yes, I'm using ionic-native.

I'm building a provider to call BackgroundGeolocation.
import {BackgroundGeolocation} from 'ionic-native';

Other plugins like Geolocation works great.

Thanks for answering,

@jgw96
Copy link
Author

jgw96 commented Jul 1, 2016

Ahh ok, thanks! Since this is an ionic native issue i am going to move this issue to the Ionic-Native repo. Thanks for using Ionic!

@nkalinov
Copy link

nkalinov commented Jul 3, 2016

Same platform, same versions, same problem here!

@nikiben
Copy link

nikiben commented Jul 6, 2016

Me too!.. Having the same issue using ionic-native. I have switched to using the "window.backgroundGeolocation" method...

@JaimeMolina87
Copy link

I'm having same problem using ionic-native from ionic 2 beta 10. Someone knows how to fix it or another way to implement background geolocation?

@AVatch
Copy link

AVatch commented Jul 7, 2016

I'm getting the warning as well, any workaround? on iOS however

@nikiben
Copy link

nikiben commented Jul 8, 2016

@AVatch I think you'll just have to use it the javascript way for now until resolve..
this works for android and iOS

` declare var window: any; //put this after imports

initBackgroundGeo2(isActivate) {
    this.platform.ready().then(() => {
        let config = {
            desiredAccuracy: 10,
            stationaryRadius: 20,
            distanceFilter: 30,
            debug: true,
            stopOnTerminate: false
            // interval: 30 * 60 * 1000    //30 min
        }

        var callbackFn = function(location){
            console.log('Location => ' + location.latitude + ',' + location.longitude);

            window.backgroundGeolocation.finish();
        }

        var errorFn = function(error) {
            console.log('BackgroundGeolocation error');
        }

        window.backgroundGeolocation.configure(callbackFn, errorFn, config);
        if(isActivate=="true"){
            window.backgroundGeolocation.start();
        }
        else{
            window.backgroundGeolocation.stop();
        }
    });
}`

@JaimeMolina87
Copy link

Mm is possible to use that way on Ionic 2 Beta 10 with only support to TS ?

@nikiben
Copy link

nikiben commented Jul 11, 2016

TS is a superset of JavaScript, so you can use JavaScript anywhere in your code.
I'm on ionic 2 beta 10 and it works like a charm for me.

@ihadeed
Copy link
Collaborator

ihadeed commented Jul 11, 2016

Should be fixed now.

The plugin not installed error happens when ionic-native fails to find the pluginRef provided in the wrapper definition. The pluginRef was set to plugins.backgroundGeoLocation instead of backgroundGeolocation

@mroberty8
Copy link

Hi, I think that the problem is not solved, maybe my mistake ?

On iOs if i follow the documentation : https://ionicframework.com/docs/native/background-geolocation/ i got the same error.

Ionic info :


cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.13.1
    ionic (Ionic CLI) : 3.13.2

global packages:

    cordova (Cordova CLI) : 7.0.1 

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.2.3 ios 4.5.0
    Ionic Framework    : ionic-angular 3.8.0

System:

    Android SDK Tools : 26.0.2
    ios-sim           : 6.1.2 
    Node              : v6.11.3
    npm               : 3.10.10 
    OS                : macOS Sierra
    Xcode             : Xcode 9.0.1 Build version 9A1004 

Misc:

    backend : pro

Installed platform :

  android 6.2.3
  ios 4.5.0

Installed plugins :

cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-mauron85-background-geolocation 2.2.5 "CDVBackgroundGeolocation"
cordova-plugin-screen-orientation 2.0.1 "Screen Orientation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Tested on iOs Emulator 6+

capture d ecran 2017-10-30 a 20 37 26

@kapilSoni101
Copy link

why closed above issue still got same error in the ionic3 version i am using :
"@ionic-native/background-geolocation": "^3.14.0"
anybody how to fix above error?

@JT-OliverFiebig
Copy link

Same problem here!

@agroves333
Copy link

agroves333 commented Jun 7, 2019

Also getting this.

[console.warn]: "Native: tried calling BackgroundGeolocation.finish, but the BackgroundGeolocation plugin is not installed."
[ng] [console.warn]: "Install the BackgroundGeolocation plugin: 'ionic cordova plugin add @mauron85/cordova-plugin-background-geolocation'"
cordova-plugin-customurlscheme 4.4.0 "Custom URL scheme"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-ionic 5.3.0 "cordova-plugin-ionic"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.0.1 "cordova-plugin-ionic-webview"
cordova-plugin-mauron85-background-geolocation 3.0.3 "CDVBackgroundGeolocation"
cordova-plugin-native-spinner 1.1.3 "Native Spinner"
cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-telerik-imagepicker 2.2.4 "ImagePicker"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.0.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
Ionic:

   Ionic CLI                     : 5.0.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic 5.3.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 12 other plugins)

Utility:

   cordova-res : 0.3.0
   native-run  : 0.2.3

System:

   ios-deploy : 1.9.4
   ios-sim    : 8.0.1
   NodeJS     : v11.6.0 (/usr/local/bin/node)
   npm        : 6.9.0
   OS         : macOS Mojave
   Xcode      : Xcode 10.2.1 Build version 10E1001

@uklawitter
Copy link

same for me...

@nesjett
Copy link

nesjett commented Sep 11, 2019

Same, but only when I use the method watchLocation()

@ProximaHaiz
Copy link

any updates here?

@RaschidJFR
Copy link

The problem seems to pseudo-fix if you call the functions from within app.component.ts instead of from a service, just as stated on the Setup Guide:

BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise...

This seems weird to me, it should be able to work from any class or service.

@RaschidJFR
Copy link

The problem keeps coming back when pulling the repo. As pointed in mauron85/cordova-plugin-background-geolocation#613, the problem seems to be that the scoped package @mauron85/cordova-plugin-background-geolocation is installed correctly the first time on a local machine but added to package.json as cordova-plugin-background-geolocation. So the next time the repo is pulled it will install the wrong package (you can verify this by looking at plugins/cordova-plugin-background-geolocation/package.json).

What's working for me so far is adding the plugin directly in package.json (@maruon85/cordova-...) so the correct plugin gets installed after adding or preparing the platform. However, the "incorrect" plugin keeps being added to the package.json but it doesn't seem to interfere anymore (a hook script may be needed to prevent this?).

// package.json
{
  "@mauron85/cordova-plugin-background-geolocation": "^3.1.0",
  "cordova": {
    "plugins": {
      "@mauron85/cordova-plugin-background-geolocation": {}
    }
  }
}

Then the "plugin not installed" message keeps showing but it's just a warning and the plugin seems to be working ok.

@aliexalter
Copy link

aliexalter commented Jun 3, 2020

@RaschidJFR

`{
  "name": "BackgroundTestApp",
  "version": "1.0.0",
  "author": "Ali Exalter",
  "homepage": "http://google.uk/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "~8.1.2",
    "@angular/core": "~8.1.2",
    "@angular/forms": "~8.1.2",
    "@angular/platform-browser": "~8.1.2",
    "@angular/platform-browser-dynamic": "~8.1.2",
    "@angular/router": "~8.1.2",
    "@ionic-native/background-geolocation": "^5.24.0",
    "@ionic-native/core": "^5.0.0",
    "@ionic-native/firebase": "^5.23.0",
    "@ionic-native/firebase-x": "^5.23.0",
    "@ionic-native/http": "^5.25.0",
    "@ionic-native/splash-screen": "^5.22.0",
    "@ionic-native/sqlite": "^5.22.0",
    "@ionic-native/status-bar": "^5.22.0",
    "@ionic/angular": "^5.0.0",
    "@mauron85/cordova-plugin-background-geolocation": "^3.1.0",
    "angular2-signaturepad": "^2.11.0",
    "angularfire2": "^5.4.2",
    "cordova-android": "^8.1.0",
    "cordova-ios": "^5.1.1",
    "cordova-plugin-advanced-http": "^2.4.1",
    "cordova-plugin-androidx": "^1.0.2",
    "cordova-plugin-androidx-adapter": "^1.1.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-firebasex": "^9.0.2-cli",
    "cordova-plugin-ionic": "^5.4.6",
    "cordova-plugin-splashscreen": "^5.0.3",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-sqlite-storage": "^5.0.0",
    "core-js": "^2.5.4",
    "firebase": "^7.14.0",
    "ion2-calendar": "^3.0.0-rc.0",
    "ionicsignaturepad": "^1.0.1",
    "moment": "^2.24.0",
    "ngx-order-pipe": "^2.0.4",
    "rxjs": "~6.5.1",
    "tslib": "^1.9.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.801.2",
    "@angular-devkit/build-angular": "~0.801.2",
    "@angular-devkit/core": "~8.1.2",
    "@angular-devkit/schematics": "~8.1.2",
    "@angular/cli": "^8.1.3",
    "@angular/compiler": "~8.1.2",
    "@angular/compiler-cli": "~8.1.2",
    "@angular/language-service": "~8.1.2",
    "@ionic/angular-toolkit": "^2.1.1",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.0",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.1.3",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.4.3"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-ionic": {
        "APP_ID": "3dde3072",
        "CHANNEL_NAME": "Master",
        "UPDATE_METHOD": "background",
        "MAX_STORE": "2",
        "MIN_BACKGROUND_DURATION": "30",
        "UPDATE_API": "https://api.ionicjs.com"
      },
      "cordova-sqlite-storage": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-device": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-firebasex": {},
      "@mauron85/cordova-plugin-background-geolocation": {
        "GOOGLE_PLAY_SERVICES_VERSION": "11+",
        "ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
        "ICON": "@mipmap/icon",
        "SMALL_ICON": "@mipmap/icon",
        "ALWAYS_USAGE_DESCRIPTION": "App requires background tracking ",
        "MOTION_USAGE_DESCRIPTION": "App requires motion detection"
      },
      "cordova-plugin-advanced-http": {
        "OKHTTP_VERSION": "3.10.0"
      }
    },
    "platforms": [
      "ios",
      "android"
    ]
  }
}`

I have only @mauron85 plugin in my package.json still i am getting error on this.backgroundGeolocation.finish(); plugin not installed.

@RaschidJFR
Copy link

RaschidJFR commented Jun 8, 2020

@aliexalter Your root package.json seems ok. Try this:

  1. Check plugins/cordova-plugin-background-geolocation/package.json, it should look something like this:

    {
      "name": "@mauron85/cordova-plugin-background-geolocation",  // <- Please note the '@mauron85/' part
      "version": "3.1.0",
      // ...
    }
  2. Make sure you are calling the plugin after the platform has been initialized: Platform.ready().then(() => /* Call here the plugin functions */ ));

  3. Check that the "plugin not installed" message is not just a warning. I never really goes away, but it will be warning-level instead of error-level.

@lrcampos97
Copy link

lrcampos97 commented Jul 1, 2020

I've been getting this problem all the time that I use the plugin:
unnamed

Here is my package.json:

{
  "name": "rastreador",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "~8.1.2",
    "@angular/compiler": "~8.1.2",
    "@angular/core": "~8.1.2",
    "@angular/forms": "~8.1.2",
    "@angular/platform-browser": "~8.1.2",
    "@angular/platform-browser-dynamic": "~8.1.2",
    "@angular/router": "~8.1.2",
    "@fortawesome/angular-fontawesome": "^0.5.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.26",
    "@fortawesome/free-brands-svg-icons": "^5.12.0",
    "@fortawesome/free-regular-svg-icons": "^5.12.0",
    "@fortawesome/free-solid-svg-icons": "^5.12.0",
    "@ionic-native/background-geolocation": "^5.27.0",
    "@ionic-native/camera": "^5.22.0",
    "@ionic-native/core": "^5.20.0",
    "@ionic-native/device": "^5.20.0",
    "@ionic-native/geolocation": "^5.20.0",
    "@ionic-native/launch-navigator": "^5.20.0",
    "@ionic-native/screen-orientation": "^5.20.0",
    "@ionic-native/splash-screen": "^5.20.0",
    "@ionic-native/status-bar": "^5.20.0",
    "@ionic/angular": "^4.11.10",
    "@ionic/storage": "^2.2.0",
    "@mauron85/cordova-plugin-background-geolocation": "^3.1.0",
    "angular2-signaturepad": "^2.11.0",
    "cordova-android": "8.1.0",
    "cordova-browser": "6.0.0",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-camera": "^4.1.0",
    "cordova-plugin-dialogs": "^2.0.2",
    "cordova-plugin-geolocation": "^4.0.2",
    "cordova-plugin-screen-orientation": "^3.0.2",
    "cordova-sqlite-storage": "^4.0.0",
    "core-js": "^2.6.11",
    "es6-promise-plugin": "^4.2.2",
    "platform": "1.3.5",
    "rxjs": "^6.5.4",
    "tslib": "^1.9.0",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.4",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.801.2",
    "@angular-devkit/build-angular": "~0.801.2",
    "@angular-devkit/core": "~8.1.2",
    "@angular-devkit/schematics": "~8.1.2",
    "@angular/cli": "~8.1.2",
    "@angular/compiler": "~8.1.2",
    "@angular/compiler-cli": "~8.1.2",
    "@angular/language-service": "~8.1.2",
    "@ionic/angular-toolkit": "~2.0.0",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.2.1",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.1.3",
    "cordova-plugin-splashscreen": "^5.0.3",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.5.1",
    "protractor": "^5.4.3",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.4.3"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-geolocation": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "uk.co.workingedge.phonegap.plugin.launchnavigator": {
        "GOOGLE_API_KEY_FOR_ANDROID": "AIzaSyCz21QM29W7JzhJEHubyNQ4SPY3N_c43cs",
        "OKHTTP_VERSION": "3.12.0"
      },
      "cordova-sqlite-storage": {},
      "cordova-plugin-camera": {},
      "cordova-plugin-screen-orientation": {},
      "cordova-plugin-background-geolocation": {}
    },
    "platforms": [
      "browser",
      "android"
    ]
  }
}

And here my plugins/cordova-plugin-background-geolocation/package.json:

{
  "_from": "cordova-plugin-background-geolocation",
  "_id": "cordova-plugin-background-geolocation@1.0.6",
  "_inBundle": false,
  "_integrity": "sha1-b7FJQz8rowCSXEO4yzc00MYh2V4=",
  "_location": "/cordova-plugin-background-geolocation",
  "_phantomChildren": {},
  "_requested": {
    "type": "tag",
    "registry": true,
    "raw": "cordova-plugin-background-geolocation",
    "name": "cordova-plugin-background-geolocation",
    "escapedName": "cordova-plugin-background-geolocation",
    "rawSpec": "",
    "saveSpec": null,
    "fetchSpec": "latest"
  },
  "_requiredBy": [
    "#USER"
  ],
  "_resolved": "https://registry.npmjs.org/cordova-plugin-background-geolocation/-/cordova-plugin-background-geolocation-1.0.6.tgz",
  "_shasum": "6fb149433f2ba300925c43b8cb3734d0c621d95e",
  "_spec": "cordova-plugin-background-geolocation",
  "_where": "D:\\SN\\branches\\Komodus_App\\Teste_Luiz",
  "author": "",
  "bugs": {
    "url": "https://github.com/ZenCity/cordova-plugin-background-geolocation/issues"
  },
  "bundleDependencies": false,
  "cordova": {
    "id": "cordova-plugin-background-geolocation-zencity",
    "platforms": [
      "android",
      "ios",
      "wp8"
    ]
  },
  "deprecated": false,
  "description": "Cordova Background GeoLocation Plugin",
  "engines": [
    {
      "name": "cordova",
      "version": ">=3.0.0"
    }
  ],
  "homepage": "https://github.com/ZenCity/cordova-plugin-background-geolocation#readme",
  "keywords": [
    "phonegap",
    "background geolocation",
    "ecosystem:cordova",
    "cordova-android",
    "cordova-ios",
    "cordova-wp8"
  ],
  "license": "MIT",
  "name": "cordova-plugin-background-geolocation",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/ZenCity/cordova-plugin-background-geolocation.git"
  },
  "version": "1.0.6"
}

How I can solve it?

@RaschidJFR
Copy link

@lrcampos97 By looking at your plugins/cordova-plugin-background-geolocation/package.json I can see the wrong plugin has been installed: cordova-plugin-background-geolocation instead of @mauron85/cordova-plugin-background-geolocation.

Try this:

  1. Remove your android platform: $ cordova platform rm android
  2. Delete your plugins folder
  3. Remove your current (wrong) plugin: $ cordova plugin rm cordova-plugin-background-geolocation
  4. Add the correct plugin: $ cordova plugin add @mauron85/cordova-plugin-background-geolocation
  5. Re-add your android platform: $ cordova platform add android

If everything goes right, you should see in your package.json this:

// package.json
{
  "cordova": {
     "plugins": {
       "@mauron85/cordova-plugin-background-geolocation": {  // <-- this has '@mauron85/'
         // ...
        }
     },
  }

And your plugins/cordova-plugin-background-geolocation/package.json should show:

// plugins/../package.json
{
  "_from": "@mauron85/cordova-plugin-background-geolocation@3.1.0",
  // ...
}

@lrcampos97
Copy link

@RaschidJFR Thank you for your response, this worked for me with a small change.

So, I did all steps that you told. And one thing was different in my packge.json

// package.json
{
  "cordova": {
     "plugins": {
       "cordova-plugin-background-geolocation": {} // <-- after all steps this continued like this
     },
  }

Then, I just manually change for your example and the problem was resolved

This plugin has other strong problems with Ionic, for example, this one #678 , that I need always create the folder mipmap :(

@RaschidJFR
Copy link

Glad it helped. Check this other thread mauron85/cordova-plugin-background-geolocation#686, maybe that's the issue you're talking about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests