0

I'm creating an app in Phonegap Android and using LocalNotification plugin from git to show the notification. Now I have the code:

  function onDeviceReady(){
    window.plugin.notification.local.add({
            id:      1,
            title:   'alert',
            message: 'Mesage',
            repeat:  'minutely',
    });
  }

With this code, the message will display every minute, but when I go to Setting then Force to Stop, the notification will not appear.
In the future,I want to show a notification in 7:00AM everyday even the app running or not.
Any advise for me to make notification appear when the app is not running. thank you for your help!

Andrew C
  • 13,845
  • 6
  • 50
  • 57
Linh
  • 433
  • 6
  • 11

1 Answers1

1

You can't. Force stop makes the app stop permanently. All alarms and receivers registered in the app will be turned off. That's the purpose of force stop- to turn the app completely off. If you want the app to continue in the background, don't force stop it.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127