import { BackgroundFetch, BackgroundFetchConfig } from '@awesome-cordova-plugins/background-fetch/ngx';
constructor(private backgroundFetch: BackgroundFetch) {
  const config: BackgroundFetchConfig = {
    stopOnTerminate: false, 
  }
  backgroundFetch.configure(config)
     .then(() => {
         console.log('Background Fetch initialized');
         this.backgroundFetch.finish();
     })
     .catch(e => console.log('Error initializing background fetch', e));
  
  backgroundFetch.start();
  
  backgroundFetch.stop();
}