EddyVerbruggen / nativescript-local-notifications

:mailbox: NativeScript plugin to easily schedule local notifications
MIT License
162 stars 57 forks source link

Notification not showing when app is in background(when app is not running) #208

Open Falu-G opened 3 years ago

Falu-G commented 3 years ago

Setup: Nativescript Angular (7.0.11) Angular (11.0.2)

@EddyVerbruggen , Kindly assist, this is what I have on the schedule method

LocalNotifications.schedule( [{ id: 5, thumbnail: true, title: 'Richard wants your input', body: '"Hey man, what do you think of the new design?" (swipe down to reply, or tap to open the app)', forceShowWhenInForeground: true, sound: "notify", ongoing: true, notificationLed: true, interval:"minute", channel: 'My Channel', badge: 1, at: new Date(new Date().getTime() + 10 * 1000), actions: [ { id: "input-richard", type: "input", title: "Tap here to reply", placeholder: "Type to reply..", submitLabel: "Reply", launch: true, editable: true, // choices: ["Red", "Yellow", "Green"] // TODO Android only, but yet to see it in action } ] }]) .then(() => { alert({ title: "Notification scheduled", message: "ID: 5", okButtonText: "OK, thanks" }); }) .catch(error => console.log("doScheduleId5WithInput error: " + error)); }

Thanks in anticipation of your feedback