Book Image

Google App Inventor

By : Ralph Roberts
Book Image

Google App Inventor

By: Ralph Roberts

Overview of this book

<center><iframe src="http://www.youtube.com/embed/UgRhYG_bvW8" width="500" height="315" frameborder="0"></iframe></center> <p>The number of mobile apps has grown exponentially in the last two years. If you want to join the crowd, Google’s App Inventor is the easiest and best tool for you to get started with. It is a tool to create Android phone apps and uses a graphical user interface, and drag and drop methods to create apps. It’s so simple that anyone can build an app.<br /><br />Learn how Google App Inventor eliminates the mystery around programming. It is a visual language, where we simply drag and drop blocks (graphic elements representing blocks of code) in various combinations to give us applications that run on our phones or other Android-based devices. No programming background is required. Playing with blocks has never been more fun!<br /><br />The emphasis is on creating apps that work and that you understand fully. The first part of the book gives you a sound foundation in the basics, and lots of tips on how to use App Inventor. The second part is all about creating complete apps ready for real world use. The book includes apps that communicate, use databases to remember, surf the Web and other networks, use GPS and various sensors on your phone, and let you write or play games.</p>
Table of Contents (19 chapters)
Google App Inventor
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Time for action testing TinyWebDB


So, let's design a quick test. You need only a button and a label, formatted a bit, naturally, as so:

In the Blocks Editor, we'll pull together the blocks below. You could use two buttons—one to store and one to retrieve—but this is more elegant.

Here's what you need and how the previous blocks work:

  1. 1. The Button1.Click causes the TinyWebDB1.StoreValue button to contact the TinyWebDB test service online (the URL in the ServiceURL field in Design previously). It works just like TinyDB in that you have a unique name tag (chester_tester for my example; use your own) and a value to store, and that is what happens.

  2. 2. The second block in the button framework, TinyWebDB.GetValue, immediately read the value just stored back out (using the chester_tester tag to call it).

  3. 3. To have a way of reading the retrieved value, we drag out the TinyWebDB1.GotValue frame (from the TinyWebDB1 drawer). In it, we put our label text block (data_returned.Text) and grab the valueFromWebDB...