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 bouncing a ball


This will bounce a ball off the walls inside our phone. It's simple, but fun to watch. Here we go:

  1. 1. Drop a Canvas on the virtual phone screen in Design. Make its width Fill Parent, but do not worry about height (we'll fix that in Blocks Editor).

  2. 2. Drop a Ball onto the Canvas.

  3. 3. In the Properties column with the Ball selected (as in the next screenshot), change the Interval parameter to 60 (the default of 1000 is too jerky, 60 is much smoother). Interval is the time, in milliseconds, between movements.

  4. 4. Set the Radius (size) to 30 and the speed to 50.

That's it for the design of our bouncy ball. Don't worry that the ball rolled over to one side and hung up—we still have to build our blocks for proper operation.

After we get the ball bouncing right, come back and play with the previous settings and observe the actions of the ball. That's the fastest way of learning how this basic animation works.

Now we go to the Blocks Editor and pull together blocks so that...