Programming Part 1: The Current Location Readout

Updating all those labels from Part 1 takes some work to set up. Let’s start with the easy ones: the data fields. Each label in the right column simply needs to be filled with the corresponding property of the Location Sensor, as in Figure 10.18. Assemble these blocks, but don’t put them anywhere yet—we have more to make.

Image

Figure 10.18 Setting the data field labels to their corresponding data from the Location Sensor.

Notice the pink trim block in Figure 10.18. I added that later while designing the app because the CurrentAddress feature tends to add extra empty lines after the address. Those ...

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.