Local Notification Background or killed app


#1

Hello

I created a local notification and is working when the app is on screen, when application is goes to background or killed I cannot receive the notification

  this.platform.ready().then(() => {
  let exp = new Date(this.expiration_date);
  let exp_date = new Date(exp);
  let today = new Date(new Date(exp));
  let data = moment(exp).format('YYYY/MM/DD');
  let data2 = moment(today).format('YYYY/MM/DD');
  var d = new Date(this.expiration_date.replace(/-/g, '/'));
  console.log(d);

  if (data == data2) {
  this.localNotifications.schedule({
    id: 1,
    title: 'myGym',
    text: 'Your subscription will expire today',
    trigger: {at: d},
      
    });
  }
  });