Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps
by Derek Walter, Mark Sherman
Event Handlers
All of your blocks, the pieces that make your app perform tasks, will be connected with an event handler. Events are created whenever something in the real world happens to the app, such as when the user clicks a button, the phone’s location changes, or the phone receives a text message. Blocks exist for just about everything you want to do in an app; taking a picture, checking the GPS location, displaying text, changing the color of a component, finding out what the user entered into a text box, and so on. You can add (or remove) these blocks from an event handler, allowing the programming to determine the precise set of actions to take when the user presses a button.
When any event happens, App Inventor runs whatever blocks are ...
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.
Read now
Unlock full access