You are on page 1of 1

Purpose

Understand how to create your own broadcast intent and broadcast receiver and ho
w to handle the given broadcast intent.
Description
In your application main screen, there are a text editor and two buttons. Once u
ser entered some string in the text editor then click the first button, a toast
message will be prompted with a message such as "Received your message <your typ
ed string>". If user clicks second button, another screen will be displayed with
registered/unregistered buttons.
1. Create an activity for your application main screen which including one text
editor and two buttons
2. Handle the first button event by creat your new broadcast intent with input f
rom the editor.
3. Modify your manifest file to declare your receiver with intentfilter for your
receiver intent
4. Create your broadcast receiver class and implement OnReceive() callback funct
ion to handle your receiver intent.
5. Use a toast message to indicate your receiver intent is handled.
6. Handle the second button to launch the second activity defined in http://www
.javacodegeeks.com/2012/09/android-broadcast-receiver.html

Requirements (10 points)


1. Use your package name with your email name, e.g.: com.cs442zhao3.myreceiver.
(+2 points)
2. Meet the description for the first button event (+3 points)
3. Meet the description from the link for the second button event (+3 points)
4. Submit report including following items (+2 points):
How project zipped package
final apk
5. Delay to submit ( -2 points)

You might also like