javascript - Local notification every hour with Ionic Framework not working? -


i trying send local notification every hour ionic framework... asked permissions sent notification never got 1 on ios device.

var onehourlater = new date(); onehourlater.sethours(onehourlater.gethours() + 1)  var notification = {   id: 1,   title: 'reminder',   text: 'reminding thing',   every: 'hour',   at: onehourlater };  localnotifications.schedule(notification); 

if not ask there way not send 1 after time not annoying , start them again @ time?

thanks!

for setting local notification @ every 1 hour can achieved using this plugin follows:

localnotifications.schedule({     id: 1,     title:'reminder',     text: "reminder thing",     firstat: after_1_hour,     every: "hour" // "minute", "hour", "week", "month", "year" }); 

for after_1_hour can try following:

var today = new date(); today.sethours(1); today.setminutes(0); today.setseconds(0); var after_1_hour = new date(today); 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -