1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
    AIDevMob is on a distinguished road

      0  

    Default Answered: Detecting app reload

    Answered: Detecting app reload


    Using Sencha Touch 2.3

    Hi,

    The problem I am facing is when a user presses the back button on their device to minimize the app. When they click the icon again to start the app, it takes them back to exactly where they were.

    Is is possible to detect this restart?

    The reason for this is I want to expire some session information and return them to the main screen when they restart the app. The app is built using a navigation view.

    Thanks.

  2. I don't believe you'll be able to glean that information with any OOB Touch event. However, if you're using PhoneGap/Cordova, you can check the app's current status with something like this.

    http://docs.phonegap.com/en/3.0.0/co...md.html#Events

    If you cannot use PhoneGap/Cordova, you may be able to create your own inactivity listener that can indicate that the user is not currently interacting with the application. Most people create a timer after a tap event and reset it on consecutive taps. If the length of time that accumulates is greater than your inactivity threshold, you can then wipe the session.

    Thanks!
    Greg

  3. #2
    Sencha - Support Team
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    281
    Answers
    40
    Vote Rating
    35
    greg.barry has a spectacular aura about greg.barry has a spectacular aura about

      0  

    Default App Status

    App Status


    I don't believe you'll be able to glean that information with any OOB Touch event. However, if you're using PhoneGap/Cordova, you can check the app's current status with something like this.

    http://docs.phonegap.com/en/3.0.0/co...md.html#Events

    If you cannot use PhoneGap/Cordova, you may be able to create your own inactivity listener that can indicate that the user is not currently interacting with the application. Most people create a timer after a tap event and reset it on consecutive taps. If the length of time that accumulates is greater than your inactivity threshold, you can then wipe the session.

    Thanks!
    Greg

  4. #3
    Sencha User
    Join Date
    Sep 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
    AIDevMob is on a distinguished road

      0  

    Default


    Hi Greg, Thanks for this. Looks like Cordova will do exactly what I need. Cheers.

Thread Participants: 1