Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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.

— asked October 6th 2010 by Derrick Huth
  • notification
  • push
0 Comments

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.

    — answered October 7th 2010 by Derrick Huth
    permalink
    2 Comments
    • Hi Derrick, could you possibly give an example of the "Payload" you use with your code above?

      — commented December 10th 2010 by Ian Tearle
    • bump

      — commented March 29th 2011 by Tobias O.
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.