App Inventor: Fusion Tables and Persistent Data

Discussion in 'Android Hacks and Help' started by RyanLhagen, Jun 3, 2011.

  1. RyanLhagen

    RyanLhagen New Member

    May 29, 2011
    Likes Received:
    Trophy Points:
    I have been learning to use Fusion Tables with App Inventor and have made pretty good headway, but I've been stuck on the same issue for the last few days. The function I am working on is a counter.

    What I have achieved so far:
    When button is clicked:
    1) a global variable of 1 increment is added to the total count global variable
    2) The new total is inserted into a new row in my fusion table under the column "CigTotal" (it's a cigarette counter)
    3) The date and time of the event is inserted into that same row in the column "Date"

    The problem:
    When the app shuts down, I lose my total count and start over from zero. I want to be able to query the fusion table when the screen initializes to retrieve the latest total, use it to set the global variable total, and then continue to add to it. For reasons too long to go into (relating to the app's intended use), TinyDB and TinyWebDB would not be appropriate in this case. I'm assuming my answer lies somewhere in establishing a specific row/column which would be updated/overwritten, and drawn from during initialization. Basically, I need a way to tell the app to add to the value of a specific cell, which would be the same exact cell every time, and get the value of that same cell on initialization (whatever it may be at any given point in time). I attached a .png image of my screen set up, block set up and the fusion table result as of now.

    I would greatly appreciate any suggestions or advice you could offer for achieving this. Thanks, RyanLee
Search tags for this page
app inventor fusion table

app inventor fusion tables

app inventor fusion tables tutorial
app inventor fusiontable
app inventor table
appinventor fusion tables
fusion table inventor

fusion tables app inventor

fusion tables appinventor
who is the inventor of counting table