@juan9222 wrote:
Hi Ionic Community, I’m having a problem with Background Mode plugin:
the documentation says that I have to enable and configure the push message in background mode
I did that inside the constructor and that part of the code is working successfully. I get my push notification and It says that geolocation mode is working on background.
Finally I have this method that I think has the problem. It’s called getCurrentBackgroundPosition.
I don’t know how to call this event, in the documentation it says that I have to trigger the event this way
cordova.plugins.backgroundMode.on(‘EVENT’, function);But when I find the method definition I get this
:
So I assume that it’s an observable and I had to subscribe to that method in order to obtain the data.
But neither my console.log or my post request to the database are not working here.
Thank you
Testing Platform: Android 8.1.0
Development OS: Mac OS Catalina
Cordova Version: 9.0.0 (cordova-lib@9.0.1)
Ionic CLI version: 6.2.0Ionic:
Ionic CLI : 6.2.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 4.11.9
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.1.2Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 6 other plugins)Utility:
cordova-res : not installed
native-run : 0.3.0System:
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.14.1
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504
Posts: 1
Participants: 1