1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    13
    Answers
    3
    Vote Rating
    0
    rob.n is on a distinguished road

      0  

    Default Answered: Event when application opens, activates

    Answered: Event when application opens, activates


    Hi,

    Ive been trying to listen for some sort of event as the application becomes active, initially loaded or when been "minimized" and reopened.

    Should i listen for some like "activate" on Viewport or is there some other way?

    The problem is that i cant seem to find a way to solve this.

    I build my application using PhoneGap and the reason i want to do this is when a push notification arrives and the user clicks "View" i want to trigger some event.

    Thanks!
    Robert

  2. Found the solution, Phonegap raises an "resume" event.

    //Robert

  3. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    395
    Answers
    14
    Vote Rating
    17
    digeridoopoo will become famous soon enough

      0  

    Default Painted?

    Painted?


    Have you tried listening for the painted event? What made me understand the order of events was also to put this at key points in my js files:

    console.log('Main View Loaded');

    console.log('Main Controller Loaded');

    so I could see in what order things were happening. Not sure if this works too well when using Phonegap though, I heard somewhere that it is hard to debug...

  4. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    13
    Answers
    3
    Vote Rating
    0
    rob.n is on a distinguished road

      0  

    Default


    Hi digeridoopoo and thanks for your answer.

    Been trying to catch the painted event as well without any luck.

    When debugging using XCode when closing the app an event is triggered perhaps theres one when the app comes alive?

    One solution might be to trigger the show event on all views and with that trying to guess if the application comes back from background...

    //Robert

  5. #4
    Sencha User
    Join Date
    Jun 2011
    Posts
    13
    Answers
    3
    Vote Rating
    0
    rob.n is on a distinguished road

      0  

    Default


    Found the solution, Phonegap raises an "resume" event.

    //Robert

Thread Participants: 1

Tags for this Thread