# 159.336 Assignment 1
Due 14th August 2023
For this assignment you need to write a simple dialer application for Android tomake phone calls.
The dialer must have the following UI elements:
A number display to show the phone number which will be called.A keypad with 12 keys (0-9, * and #), pressing one of these keys will
add a character to the number.A delete button that deletes the last character of the number.
A “Call” button to place a phone call.
A simple implementation of this UI could look like the layout on the right.
Your app doesn’t have to look like this but it must have the same functionality.
When the call button is pressed, the dialler should place a phone call using an Intent with action: Intent.ACTION_CALL and a data URI containing
“tel:”+number.
Make sure your app obtains permission to make phone calls (Manifest.permission.CALL_PHONE) at runtime and that your app works on
devices with API level 21 and later.
Make sure your app behaves correctly when the device is rotated (including while the app is running) and the app is usable on devices with different screen
sizes.
You must only have a single Activity in your app.
Your app most also accept ACTION_DIAL intents by registering an intent filter for the scheme “tel”, to test this you will need to do:
am start -a android.intent.action.DIAL -d “tel:094140800”
from an adb command line shell.
Submit your assignment on Stream. You must submit a zip file containing a clean source tree. To do this, use “Zip File…” in Android Studio. You do not need to submit an apk. Do not use any libraries other than those included in the File..Export to
latest Android SDK. You will lose marks if you submit a zip which was not created by Android Studio or any other format (such as rar or 7z). Marks will be deducted for zip files which do not build correctly. Do not change the top level gradle build
file.
This is an individual assignment, you can not work in groups. Marks will be awarded for well written programs. Use commentsin your code to document it. Marks will be subtracted for plagiarism, late submission and bad documentation.
This assignment is worth 10% of the total marks for the course.
1 | M Johnson 2023 |