This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
[SUGGESTION] Need suggestion for creating water reminder app #2042
Open
Description
I want to create water reminder app.
my logic is to send notification to user, in between time range of day
like Everyday 8AM to 10:30PM at interval of 1.5Hours,
I am thinking to set localNotificationSchedule and set
date: new Date(Date.now() + intervalhere), and when user receive notification i want to call another function and then
set again new notification with that received notification
timestamp+intervalmilisec.
Any suggestion how to do this or it is correct way to do,
I want to know how to trigger some code in app WHEN user just receive notification. I want to run that code even user ingnore or intract with notification,
my code:
PushNotification.localNotificationSchedule({
channelId: 'oneoone',
autoCancel: true,
date: new Date(Date.now() + intervalMs),
allowWhileIdle: true,
bigText:
'Have you drunk water?',
title: 'Water reminder',
message: 'Have you drunk water?',
vibrate: true,
vibration: 300,
playSound: true,
soundName: 'default',
actions: '["Confirm", "No"]'
})
~~~