Book Image

App Inventor 2 Essentials

Book Image

App Inventor 2 Essentials

Overview of this book

App Inventor 2 will take you on a journey of mobile app development. We begin by introducing you to the functionalities of App Inventor and giving you an idea about the types of apps you can develop using it. We walk you through the technical set up so you can take advantage of the interactive development environment (live testing). You will get hands-on, practical experience building three different apps using tutorials. Along the way, you will learn computer science principles as well as tips to help you prepare for the creative process of building an app from scratch. By the end of the journey, you will learn how to package an app and deploy it to app markets. App Inventor 2 Essentials prepares you to amass a resource of skills, knowledge and experience to become a mobile app developer
Table of Contents (15 chapters)
App Inventor 2 Essentials
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Coding the blocks – requesting data


The first code that we need to program is to request data from the Fusion Table. Click on GuestList_Screen in the Blocks drawer and drag the when GuestList_Screen.Initialize event. This event is automatically triggered whenever a screen is launched. We want to request data from the Fusion Table when the GuestList screen is launched. Thus, we will add to this event is the call FusiontablesControl1.GetRows block. This block will let us request data from the Fusion Table. You can find this block in the FusiontablesControl1 blocks drawer. The GetRows block needs two pieces of information to fetch rows from Fusion Tables: the ID of the table and name of the column. We identified the table ID when we were creating the Fusion Table. Paste that ID into the tableId socket of the GetRows block using a Text block. Use another Text block to specify the column name, 'Guest Names'. Note the single quotes; just like in the InsertRows block, the column names have to...