Background geolocation not working

I use the plugin cordova-mauron85-background-geolocation
I use ionic-native Background-Geolocation

to check whether background tracking is works, I send notification.
but with below code, but dosent’ work …what wrong with code ?

at constructor, I call startLocation function to start track of background geolocation

constructor(public ...){
 this.startTracking();
  }
  startTracking(){
  let config = {
    desiredAccuracy: 0,
    stationaryRadius: 20,
    distanceFilter: 10, 
    debug: true,
    interval: 2000 
  };
 
  this.backgroundGeolocation.configure(config).subscribe((location) => {
 
    console.log('BackgroundGeolocation:  ' + location.latitude + ',' + location.longitude);
 
    var data={
         "app_id": "xxxxx", 
  "include_player_ids": ["xxx"],
  "data": {"foo": "bar"},
  "contents": {"en": "2323"+location}
     }
     let headers = new Headers({ 'Content-Type': 'application/json' });
    let options = new RequestOptions({ headers: headers });
    if(this.platform.is('android')){
        this.http.post('https://onesignal.com/api/v1/notifications', data, options).toPromise().then((res)=>{
            console.log(res.json())
        }).catch((error)=>{
            alert(error);
        })
    }else{
         
    }
 
  }, (err) => {
 
    console.log(err);
 
  });
 
  // Turn ON the background-geolocation system.
  this.backgroundGeolocation.start();
 
 
  // Foreground Tracking
 
let options = {
  frequency: 3000, 
  enableHighAccuracy: true
};
 
this.watch = this.geo.watchPosition(options).filter((p: any) => p.code === undefined).subscribe((position) => {
 
  console.log(position);
 
  
 
});
  }

I have the same problem. Did you resolve it?

Did you get any solution for this?
When you want to interact with the server, when the app is in background.

Try this:

import {
    BackgroundGeolocation ,
    BackgroundGeolocationConfig ,
    BackgroundGeolocationResponse ,
    BackgroundGeolocationLocationProvider,
    BackgroundGeolocationEvents
} from '@ionic-native/background-geolocation';

...

let config: BackgroundGeolocationConfig = {
    desiredAccuracy: 10,
    stationaryRadius: 1,
    distanceFilter: 1, 
    debug: true,
    interval: 2000,
    stopOnTerminate: false,
    url: 'my-link', // location is sent automatically to this url in background or foreground or app is closed
    postTemplate: {
        lat: '@latitude',
        lng: '@longitude'
};
	
this.backgroundGeolocation.configure(config).then((location: BackgroundGeolocationResponse)=>{
    this.globals.lat = location.latitude;
    this.globals.lng = location.longitude;
}, (error) => {
    alert(error);
});

this.backgroundGeolocation.on(BackgroundGeolocationEvents['location']).subscribe((location) => { 
    // here put code for the action you want after location changed event
    // this code does not work when app is closed
});

This works in foreground and background!

i tried this but in android 6 huawei mobile its not working its return “OK:” instead of location. could you please hep with this.