facebook

How to count how many times has app started

💡
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 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #332480 Reply

    Max87
    Member

    Hi guys,
    I was thinking, is there any option to know, how many times user runs my application?
    Or, is there any chance to differ if app is run for the first time or has been executed in the past?
    My point is, that in my app I call function in document.ready which selects data from database and displays it on screen. But if app runs for the first time, tables are just created, so no data are there.
    I created condition in db.transaction SELECT function, if number of results is 0, return error, but is not working correctly.
    Have you any advices?
    Thanks.

    #332496

    Unknown Author
    Participant

    How about a variable in localstorage?

    If flag doesn’t exist {put flag in localstorage and set to 1}
    else {get value from local storage; increment value; update localstorage}

    -1TC

    #332501

    support-michael
    Keymaster

    I second @thinchips proposal. Localstorage is so simple to use. I avoid using web sql unless I absolutely have. It is overkill for many of the uses I have seen.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: How to count how many times has app started

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