Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49103

Trigger at firebase data time matches with current time

$
0
0

@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.tasktiming
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.js

 const 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

Read full topic


Viewing all articles
Browse latest Browse all 49103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>