Push Notification inside ScheduledAgent in Windows Phone 8 -
i achieve similar task, in want re-establish push notification channel using background agent. possible?
i using following code inside scheduledagent, not working. if cannot access channel apis, there alternative that? how have popular apps whats-app , others been able achieve this? please me.
can advise me alternative? how can update user there new him server without using approach?
protected override void oninvoke(scheduledtask task) { //todo: add code perform task in background httpnotificationchannel pushchannel = httpnotificationchannel.find("hikeapp"); if (pushchannel == null) { pushchannel = new httpnotificationchannel("hikeapp"); // register events before attempting open channel. pushchannel.channeluriupdated += new eventhandler<notificationchannelurieventargs>(pushchannel_channeluriupdated); pushchannel.open(); pushchannel.bindtoshelltile(); pushchannel.bindtoshelltoast(); } else { // channel open, register events. pushchannel.channeluriupdated += new eventhandler<notificationchannelurieventargs>(pushchannel_channeluriupdated); } #if debug_agent scheduledactionservice.launchfortest(task.name, timespan.fromseconds(1)); #endif notifycomplete(); }
as per list of unsupported apis in background agents, not possible in microsoft.phone.notification
namespace, includes push notifications, scheduled agent.
Comments
Post a Comment