O'Reilly logo

Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps by Mark Sherman, Derek Walter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Location Data

Location is just a set of numbers: latitude and longitude. You can always ask the Location Sensor for its most recent reading of those numbers using the getter blocks because they do appear as component properties. They’re also accessible in the LocationChanged event as parameters. Both methods look at the same data and work exactly the same (see Figure 10.4).

Image

Figure 10.4 Two versions of the LocationChanged event: One gets the location data from the event parameters, and the other gets the data from the component properties. They work exactly the same. Only one can exist at a time in a project, however (which is why the red error ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required