9.14. No Texting While Busy Tutorial (Optional)

Time Estimate: 90 minutes

9.14.1. Preview

(Teacher Tube version)
No Texting While Busy uses the App Inventor Texting Component to receive and send text messages. This version is a variation of the No Text While Driving tutorial and it shows how to use the Texting component over Wifi (for devices with no Sim card or Mobile service plan). The app itself is bare bones. IMPORTANT NOTE: Google Voice has been updated and is no longer working for use with the texting component. In order to test apps that require the texting component, disable Google Voice in App Inventor and use an Android device that has cellular service (e.g. an Android cellphone). This app is designed to respond automatically to messages received while the user is busy. The app simply displays the message in a log and sends an automatic response.

The lesson contains several suggestions for enhancements.



Objectives: In this lesson you will learn to :

  • use App Inventor's Texting component;
  • work with Google Voice, both the mobile app and the Google Voice account;
  • handle received text messages in App Inventor.

9.14.2. Tutorial

To get started, open App Inventor with the No Texting While Busy Template in a separate tab and follow along with the following tutorial.

If you prefer, you can click here for a text-based version of the tutorial.

NOTE: To test this app, it is necessary to package and install it on your device. IMPORTANT NOTE: Google Voice has been updated and is no longer working for use with the texting component. In order to test apps that require the texting component, disable Google Voice in App Inventor and use an Android device that has cellular service (e.g. an Android cellphone). 


9.14.3. Enhancements: Creative Projects

Here are some ideas for programming projects.

  • Customization: Add a feature that allows the user to input the message that gets sent automatically while busy. For a simple version of this, a Textbox and a Button could be used.
  • Customization: A more sophisticated version of the above enhancement might be to add a Listpicker that lets the user choose the category of ‘busyness’ and then sets the outgoing message to one that is appropriate for that category. For example, the categories might by [driving, studying, working] and the corresponding messages might be [“Driving, TTYL”, “Gotta study now sorry”, “I’m at work now and can’t respond. I’ll get back to you soon..”].
  • Look and Feel: Improve the overall appearance of the app by using layouts, images, and other UI features.
  • Persistence: Add a TinyDb component to the app so that their custom replies will persist between uses of the app.
  • Settings Screen (Advanced): Add a second Settings screen that allows the user to set certain Texting and/or app properties. For example, for the Texting component, let the user control whether GoogleVoice is enabled and when the app is receiving messages (Off, Always, Foreground). For the app, maybe the custom message setting could be done on this screen?
    HINT: You may need to use the How to: Pass Information Between Screens tutorial.

9.14.4. Self-Check

9.14.5. Reflection: For Your Portfolio

Create a new page named No Texting While Busy under the Reflections category of your portfolio and write brief answers to the following questions.

  1. What is the main functionality of this app? Which block(s) control the primary function of this app?
  2. Describe briefly how the MessageReceived event handler works.
  3. Describe one of your enhancements and how it works.