9.13. Socially Aware App: Broadcast Hub Tutorial¶
Time Estimate: 90 minutes
BroadcastHub The Broadcast Hub app uses email and texting to broadcast messages to a group of members who join the hub. This useful technology is used in many places that have unreliable internet access but do have mobile phones, for example in this PBS video on broadcast hubs in Africa.
This tutorial uses the App Inventor Texting Component and the ActivityStarter Component for email to send messages to the list of registered members.
Requirements: This tutorial requires that an email address and email app are set up on the device to be able to send email messages. If you want to use texting, you need a device with an SMS service plan (e.g. an Android phone with service including texting). Google Voice no longer works with the App Inventor Text Component to receive text messages (although it does work to send them). However, you can do this tutorial with just using email over a WiFi connection and skip the sections that require texting.
Objectives: In this lesson you will learn to :
9.13.2. Building the BroadcastHub app¶
The Broadcast Hub app allows people to join the hub by texting or entering their contact information. Messages are broadcast to all members of the hub:
To get started open App Inventor with the new BroadcastHubEmailText Template in a separate tab and follow along with the
revised text tutorial
or the revised video below.
9.13.3. Enhancements: Creative Projects¶
Here are some ideas for programming projects.
- Abstraction: refactor your code to add more procedures with parameters, for example sendText(number, message), sendEmail(emailAddresses,message), addMember(member) which will add to the list and display the list, addMessage(message), etc.
- Persistence: Add a TinyDb so that the members of the hub can persist from one use of the app to another.
- Deleting Members: Modify the app so that a member can be removed from the hub using the User Interface. If you are able to receive text messages, you can also have a protocol that deletes a user based on a received text message like “remove me”.
- Longer-term (Advanced) Project: Come up with your own variations of this app. For example, one variation might be to extend the app to have multiple types of hubs -- family, friends, etc. And, allow members to tag their messages with certain prefixes to indicate which distribution list should receive the message -- e.g. “family: The picnic is at 1 PM’. Another variation might be to use the Social/Twitter component to tweet messages to your member list.
9.13.4. Still Curious?¶
Learn more about how mobile phones are used in Africa. How is their experience similar to yours? How is it different?
9.13.6. Reflection: For Your Portfolio¶
Create a new page named Broadcast Hub under the Reflections category of your portfolio and write brief answers to the following questions:
- How is the For Each loop used in this app? What is the significance of this loop?
- Besides Texting and the For Each loop, what programming concept plays a significant role in the functionality of this app? Explain.