Push Notification Help Please
I am using Urban Airship to implement push notification in an app. All is going well, the app registers itself for push notifications and I can send a notification and display an alert.
I want the app to display a specific page after the alert is acknowledged but I cannot get it to work.
My app.js includes the following:
callback:function(e)
{
var pid = e.data.pid;
win11.pid = pid;
alert(JSON.stringify(e.data));
Titanium.UI.currentTab.open(win11,{animated:true});
}
Anyone got any idea why the window does not open?
Many thanks.
1 Answer
-
I have solved my problem, so in case it is of use to anyone else.
The code above was all O.K., the problem is that as per the advice that device registration should take place as soon as the app opens I had placed the code in app.js. Unfortunately as soon as the app opens it fires up the homepage.
Moving all the push notification code to the homepages js file solved the problem.