Page 1 of 1

Push notification Send automatically

Posted: Tue Oct 29, 2013 1:40 pm
by ishani modi

Hi,
Can u give me some steps how to send Push message periodically to devices after some time span ?
Example : i want to notify user that there is update in application and the application updates every 1 hour. How would i be able to send push message to user about update?


Push notification Send automatically

Posted: Tue Oct 29, 2013 3:34 pm
by maxkatz

You can send Push notification from any application that supports REST http://docs.appery.io/documentation/p...
You can also use Appery.io server code: http://docs.appery.io/documentation/b...


Push notification Send automatically

Posted: Wed Oct 30, 2013 5:26 am
by ishani modi

Yea thanks for this, but i dont get an idea where should i write this curl script ?


Push notification Send automatically

Posted: Wed Oct 30, 2013 6:37 am
by ishani modi

In the link which is send
In server code i am able to understand what it does.
But where should i write send method ? in server code ?
and from where should i call PN.send(...) ? will i be able to call on button click ?


Push notification Send automatically

Posted: Wed Oct 30, 2013 8:52 am
by Kateryna Grynko

Hi Ishani,

For now, this can't be done in server code. You can create an admin mobile application that sends Push notification with a particular period.

Here is an example of a periodic function call:
precode//set interval
var intervalID = setInterval(function(){alert("Interval reached");}, 5000);

//remove interval
clearInterval(intervalID);/code/pre


Push notification Send automatically

Posted: Wed Oct 30, 2013 9:01 am
by ishani modi

Hi thanks for it.
I have confusion. If i want to send push message on button click will i be able to do that ? will i be able to call PN.send(...) on button click ?


Push notification Send automatically

Posted: Wed Oct 30, 2013 9:32 am
by Kateryna Grynko

Ishani,

Yes. Please note it should be in admin app.


Push notification Send automatically

Posted: Wed Oct 30, 2013 9:53 am
by ishani modi

ok, :) just to clarify i have created app having admin rights also for this i have followed http://docs.appery.io/documentation/b... this document.
so if i invoke same rest service example on button click i will be able to send notification right..!!


Push notification Send automatically

Posted: Wed Oct 30, 2013 10:43 am
by Kateryna Grynko

Yes. This is what you do to send them.