Skip to Main Content
App Inventor
book

App Inventor

by David Wolber, Hal Abelson, Ellen Spertus, Liz Looney
May 2011
Beginner to intermediate content levelBeginner to intermediate
386 pages
11h 41m
English
O'Reilly Media, Inc.
Content preview from App Inventor

Chapter 23. Reading and Responding to Sensors

image with no caption

Point your phone at the sky, and Google Sky Map tells you which stars you’re looking at. Tilt your phone, and you can control the game you’re playing. Take your phone on your daily walk, and a breadcrumb app records your route. All of these apps are possible because the mobile devices we carry have high-tech sensors for detecting our location, orientation, and acceleration.

In this chapter, you’ll revisit the App Inventor components LocationSensor, OrientationSensor, and AccelerometerSensor. Along the way, you’ll learn about the global positioning system (GPS); orientation measures like pitch, roll, and yaw; and some math for processing accelerometer readings.

Creating Location-Aware Apps

Until the popularization of the smartphone, computing was on desktop lockdown. Yes, laptops are mobile, but not in the same sense as the tiny devices we now carry around in our pockets. Computing has left the lab and the office, and is now taking place out in the world.

One significant effect of carrying our computing with us is a new, very interesting piece of data for every app: a current location. Knowing where people are as they move about the world has far-reaching implications and the potential to help us greatly in our lives. It also has the potential to invade our privacy and be a detriment to humanity.

The “Android, Where’s My Car?” app (Chapter 7 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hello App Inventor!

Hello App Inventor!

Carl Simmons, Paula Beer
App Inventor 2 Essentials

App Inventor 2 Essentials

Felicia Kamriani, Krishnendu Roy
App Inventor 2, 2nd Edition

App Inventor 2, 2nd Edition

David Wolber, Hal Abelson, Ellen Spertus, Liz Looney

Publisher Resources

ISBN: 9781449306786Supplemental ContentErrata Page