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 – receiving data


The previous blocks request in data from the Fusion Table, now we need to code receiving the information from the Fusion Table. The when FusiontablesControl1.GotResult block does this. You will find it in the FusiontablesControl1 blocks. As we mentioned before, when data from Fusion Tables is received, this event gets triggered. The data is placed in the result variable of this event.

By default, the data we receive from the Fusion Table is a block of text with each row placed on its own line. This data also includes the column header. So, let's say the Guest Names column of our Fusion Table has three rows with the names Olivienne, Dash, and Eva. Then the data that is placed in the result variable has four lines—Guest Names, Olivienne, Dash, and Eva (the column header followed by the three names).

Since we want the when FusiontablesControl1.GotResult event to automatically display the guest names (and the header), select and connect the set GuestListLabel...