@usufalrais wrote:
Just I am trying to create an todo application with local notification on time ionic 3. I have a stored data in firebase realtime with taskname and time which i shown in below attachment. I want to get notification from firebase when it meet the current time.
this case i have initiated cloud function using firebase tools
I am new to server side.
I need to know how to write function for matching current time to time in server. please help me with the code. if time matches it need to give local notification.
i will attach my index.jsconst functions = require('firebase-functions');exports.timetrigger= functions.database.ref('/tasklist/{taskId}/')ontrigger(event=>{ const taskKey=event.data.key; const taskValue=event.data.val(); const taskTime=taskValue.time; const currentTime=moment(new Date).format();});
Posts: 1
Participants: 1