Parameters Sent by TinyWebDB in App Inventor for Android

October 14, 2010

TinyWebDB is a component in App Inventor for Android that lets your app communicate with a web page in order to set or retrieve values, rather than storing them on the phone itself.

I wanted to know what the TinyWebDB component sends to the web page when it tries to set or retrieve values, so I used Kodingen this morning to write a PHP script that takes the form fields and values sent to the page and writes them to a file.

Here is what I found:

TinyWebDB.StoreValue sends these parameters:

  • tag

  • value


TinyWebDB.GetValue sends this parameter:

  • tag


So if you write your own PHP page for TinyWebDB to connect to, you can know if TinyWebDB is trying to store a value if the "value" key exists in the $_POST array. If the "value" key doesn't exist in the $_POST array then you know that TinyWebDB is only trying to retrieve the value for the given tag.

As an alternative to using the method outlined by Google, you could use TinyWebDB with your own script written in any web programming language. Your script would read the field names and values from the form parameters and save or retrieves those values to/from your own database.
Anthony Tietjen

About the Author

Anthony Tietjen is a software engineer with experience across desktop, mobile, and web development. Husband and father, with a passion for music and the outdoors. Connect with Anthony on LinkedIn and X/Twitter