push local Notification depend on time

You must Login before you can answer or comment on any questions.

i want to push Notification in Specific time see the code

var notification = Titanium.Android.createNotification({
            contentIntent: pending,
            contentTitle: 'New Notification',
            contentText: 'Hey there Titanium Developer!!',
            tickerText: 'You have a new Titanium message...',
            ledARGB: 1,
            number: 1,
            when: new Date().getTime()
        });
i want it in Specific time like every day in 11 o'clock

can i do that

1 Answer

You'd want to do this from a server, not from a device. A server would best keep track of time and push to a channel at that certain time. See the REST API docs for Push Notifications

— answered 8 months ago by Anthony Decena
answer permalink
3 Comments
  • but i want make it every day in same time can i do in local

    thanks

    — commented 8 months ago by tareq alzhrani

  • If you want to do it local, just change the when property to when you want the notification to fire. You'll have to create a new notification each time the previous notification is responded to. However, local notifications won't fire if the app is not running at least in the background.

    — commented 8 months ago by Anthony Decena

  • (local notifications won't fire if the app is not running at least in the background) good help thanks

    — commented 8 months ago by tareq alzhrani

Your Answer

Think you can help? Login to answer this question!