You are previewing App Inventor 2 Essentials.
O'Reilly logo
App Inventor 2 Essentials

Book Description

A step-by-step introductory guide to mobile app development with App Inventor 2

About This Book

  • Get an introduction to the functionalities of App Inventor 2 and use it to unleash your creativity

  • Learn to navigate the App Inventor platform, develop basic coding skills and become familiar with a blocks based programming language

  • Build your very first mobile app and feel proud of your accomplishment

  • Follow tutorials to expand your app development skills

  • Who This Book Is For

    App Inventor 2 Essentials is for anyone who wants to learn to make mobile apps for Android devices – no prior coding experience is necessary.

    What You Will Learn

  • Perform technical setup and navigate the App Inventor platform

  • Utilize the interactive development environment by pairing a mobile device with a computer using Wi-Fi or USB

  • Build three apps: a game, an event app and a raffle app

  • Create the user interface of the app in the Designer and program the code in the Blocks Editor

  • Integrate basic computer science principles along with more complex elements such fusion tables and lists

  • Test and troubleshoot your applications

  • Publish your apps on Google Play Store to reach a wide audience

  • Unleash your creativity for further app development

  • In Detail

    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

    Style and approach

    Every topic in this book is explained in step-by-step and easy-to-follow fashion, accompanied with screenshots of the interface that will make it easier for you to understand the processes.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the code file.

    Table of Contents

    1. App Inventor 2 Essentials
      1. Table of Contents
      2. App Inventor 2 Essentials
      3. Credits
      4. About the Authors
      5. About the Reviewer
        1. eBooks, discount offers, and more
          1. Why subscribe?
      7. Preface
        1. What this book covers
        2. What you need to build mobile apps
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. Unleashing Creativity with MIT App Inventor 2
        1. What is MIT App Inventor 2?
          1. Understanding your role as a mobile app developer
          2. Brainstorming app ideas
          3. The Design Thinking process
            1. Empathize
            2. Define
            3. Ideate
            4. Prototype
            5. Test
          4. Computational thinking
            1. Best practices to design apps
        2. MIT App Inventor – purpose and potential
          1. Discovering the possibilities of MIT App Inventor
          2. MIT App Inventor examples
            1. Stopwatch and Timer
            2. Yahtzee
            3. BYJ3S
            4. Loops
            5. Quartet
            6. Brain Reaction Accelerator
          3. ConstHelp – Contractor Tools
          4. UMATI
          5. Ez School Bus Locator
          6. Youth Radio
          7. Rover 800 Remote
        3. Summary
      9. 2. Setting Up MIT App Inventor 2
        1. The initial setup
          1. System requirements
          2. Signing up a Google account
          3. Logging in to MIT App Inventor
        2. Connectivity setup
          1. Downloading the AI2 Companion app
          2. Connecting your computer and Android device with WiFi
          3. Connecting the emulator or connecting using a USB cable
            1. Step 1 – installing the App Inventor setup software
              1. Installing the App Inventor setup software for Mac OS X
              2. Installing the App Inventor setup software for Windows
                1. Software installation – part A
                2. Driver installation – part B
              3. Installing the App Inventor setup software for GNU/Linux
                1. Instructions for systems that can install Debian packages (for example Debian or Ubuntu)
                2. Instructions for other GNU/Linux systems
            2. Step 2 – launch aiStarter
              1. Starting aiStarter
            3. Step 3 – opening a project and connecting to the emulator
            4. Step 4 – setting up your device with a USB cable
            5. Step 5 – connecting your computer and device (authenticating if necessary)
            6. Step 6 – testing the connection
        3. Summary
      10. 3. Navigating the App Inventor Platform
        1. The projects view
          1. Creating a new project
        2. The Designer
          1. Palette
          2. Viewer
          3. Components
          4. Properties
          5. Media
        3. Creating a game app
          1. Creating the UI in designer
          2. IDE
        4. The Blocks editor
          1. The Blocks drawer
          2. Types of Blocks
            1. Using Blocks to program Fling
              1. The Play button
              2. Moving the ball
              3. Flinging the ball
              4. Ending the game or bouncing the ball
              5. The Reset button
        5. Summary
      11. 4. Fling App – Part 2
        1. Adding a scoring feature
          1. Coding scoring blocks
          2. Updating the score label
        2. Increasing difficulty
        3. Changing the game's dynamic
        4. Creating levels
        5. Updating the score label to display the level
        6. Updating the Reset button
        7. Updating the Play button
        8. Summary
      12. 5. Building an Event App
        1. User Interface for an event app
        2. Setting the background image
        3. Adding an image component
        4. Adding buttons
        5. Adding the ActivityStarter
        6. Adding screens
        7. Programming the blocks
          1. Navigating between screens and launching maps
          2. Screen1
            1. Sharing blocks between screens using the Backpack
            2. Adding text to screens
        8. Summary
      13. 6. Introduction to Databases
        1. Creating a database
          1. Creating a Google Fusion Table
        2. Designing the RSVP screen
          1. Creating the GUI in the designer window
        3. Setting up Google Authentication
        4. Sharing the Fusion Table with the service account email
        5. Connecting the app to the Google Fusion Table
          1. Our goal
        6. Pushing data to the Fusion Table
        7. Ensuring empty rows are not inserted
        8. Viewing the guest list
        9. Coding the blocks – requesting data
        10. Coding the blocks – receiving data
        11. Sharing the Event App
        12. Summary
      14. 7. Learning About Loops with a Raffle App
        1. Creating the project and building the GUI
          1. Creating a new project
          2. Creating the User Interface (UI)
          3. Programming the behavior of the Digital Raffle app
          4. Creating and initializing the variable and list
          5. Receiving text messages from participants
          6. Adding the phone numbers of all the participants to the list
          7. Selecting a winner
          8. Notifying the winner
          9. Notifying everyone else
          10. Using loops
          11. Clearing out the list and variable
        2. Summary
      15. 8. Expanding Your Mobile App Development Skills
        1. Design principles
          1. User-centered design
          2. Visual hierarchy
          3. Responsive design
          4. Research app markets
          5. Design tools
        2. App Inventor extras
          1. Shortcuts
          2. Help
          3. Titles
          4. Images
          5. Virtual screens
          6. Backups
        3. Distributing your app
          1. The App Inventor Gallery
            1. Viewing the Gallery apps
            2. Sharing your app in the Gallery
            3. Creating an AIA file
          2. Downloading and sharing
          3. Creating an APK
            1. QR code
            2. Direct download (or side-loading)
          4. The Google Play Store
        4. Summary
      16. Index