facebook

Are we nearly there yet?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #338562 Reply

    Stu Wade
    Member

    Hi guys,

    My WebApp prototype of an intended native iOS iPad App is ‘complete’ – I dare not say finished 🙂

    But … There is a minor snag – non-fatal, but somewhat annoying.

    Should the user navigate away from my App, they return to the startup page and all captured data is lost.

    Q1 – will this behaviour be inherited by the eventual native App?

    Q2 – if yes – I assume that to avoid this I need to use Local Storage?

    Q3 – if yes – is there a neat ‘capture/restore App state’ API, or will all widget values and global variables have to be dealt with on an individual basis – not hard, but a major PITA.

    and finally …

    Q4 – what is the event that I need to capture when my App is about to ‘lose focus’?

    #338563

    Unknown Author
    Participant

    Sounds like you just need to capture some settings in localstorage and use them to set things when the relevant page is called. Dont make it more complex than it is.

    -1TC

    #338565

    Stu Wade
    Member

    Thanks 1tc! Working on a Sunday? Didn’t expect any feedback before the morrow.

    The App records and scores a session of Contract Bridge. There is no real reason why a user should leave the App while this is going on, but then users are notoriously fickle.

    You are of course correct except that ‘some settings’ could amount to well over a hundred. This will substantially increase my code size for what is essentially a cosmetic benefit.

    I have noticed that many Apps seem to restart in the ‘as they were’ state – so was hoping this was going to be an ‘insider trick’ exercise rather than a ‘write fail safe code’ one.

    #338569

    Unknown Author
    Participant

    I’m not working on Sunday. App development is not my career, it’s my hobby.

    There’s no insider trick. I’ve just released an app with 31 settings. So, 31 local storage entries and 31 widget states to set during page transition onto the Settings page.

    -1tc

    #338570

    paulD
    Member

    Hi stu

    If your planning on it being a native ios app it will remember your settings. You only need to use local storage with web apps.

    Hope that helps

    Paul

    #338575

    Unknown Author
    Participant

    I’m sorry, but that’s not true. For iOS apps, if the app goes out of recently used memory and needs to be reloaded, your settings will vanish.

    #338585

    paulD
    Member

    Ok maybe I’m not getting the local storage thing? But when i exit my apps and re-open it remembers that last page and things like select lists ect…….. Its only when I double click the device round button and delete the app, it resets to start up page?

    I do use appcache support though.

    Its only when i output a web app its resets every time?

    Paul

    #338589

    Stu Wade
    Member

    Thanks a million guys. The behaviour you describe, Paul, is just what I would wish and if the data is persistent until the App is closed – that would be icing on my cake.

    Of course, that means there is a need for a ‘Start a new Session’ action, but that is much easier than storing what could be as many as 260 variables.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Are we nearly there yet?

You must be logged in to post in the forum log in