I created a PWA using framework7 cli.
How can i add a reminder for a certain (date and time)?
i want the reminder trigger even if the app is closed!
You probably mean Push notifications? It is possible only on Android. But you will need to manually implement āweb push notificationsā - google this phrase for examples on the web
I found you need to use the master branch. The older versions didnāt work for me.
hello my friend
i think this is the right thing for me but could you tell me where should i put below code? (because on my pages cordova is not recognized!)
cordova.plugins.notification.local.schedule({
title: āDesign team meetingā,
text: ā3:00 - 4:00 PMā,
trigger: { at: new Date(2017, 10, 27, 15) }
});
Hi Peyman. You need to install the plugin:
cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications#master
I did install it man.
I just want to know on which files ācordova.plugins.notification.local.scheduleā is recognizable?
no, i just want to add an event to phone local calendar.
If the plugin is installed correctly ācordova.plugins.notification.local.scheduleā will be available globally (all files). It should be accessible from the global window object also i.e. window.cordova.plugins.notification.local.schedule
It doesnāt work.
here is what i did:
1.created a react + cordova project with f7 cli.
2.opened terminal an navigated to cordova folder
3.ran command ācordova plugin add https://github.com/katzer/cordova-plugin-local-notifications#masterā
4.in my home.jsx file added :
componentDidMount() {
alert ( cordova.plugins.notification.local.schedule({
title: āDesign team meetingā,
text: ā3:00 - 4:00 PMā,
trigger: { at: new Date(2019, 9, 28, 28) }
}) );
}
5.build apk using npm run build-cordova-dev
But it printed Undefined and didnt add any reminder!
what should i do my friend?
Hi Peyman. Did you get any error messages when you installed the plugin? I had to manually install one or two other plugins based on the error messages produced by ācordova plugin add https://github.com/katzer/cordova-plugin-local-notifications#masterā in order to get it working.
Iām pretty sure i did everything right.
If you could show me the code you used for setting a new local notification in your project i would be very thankful!
Hi Peyman. Iām sure you can figure the rest out with the about clues. If you need detailed help I am available for hire. Just send me a direct message.