Reference no: EM132368679
Assignment - Application with multiple activities
Android Development
This assignment requires you to develop a simple Android application that uses multiple activities, which are related using Intents. To write the application you will need to use the Android Studio (IDE) 3.2 or latest version.
Your application must perform all tasks listed in this document and can run on any Android device with a minimum API version of 21 (Lollipop 5.0) up to the latest version of Android.
Your application should be created to display correctly on an emulated Nexus 5X ( 1080 X 1920 pixels in portrait orientation) - however, by using sizes specified in "density independent pixels" (dp) the application should also be able to display correctly on any Android device with any sized screen and resolution.
Tasks
Task 1
Create an app. that will offer two features:
(i) Build the Australian GST Calculator with two inputs - Price without GST and GST Percent. After clicking the calculate button, it displays the following details:
• Price without GST
• GST Percent
• Price with GST
• GST Amount
(ii) BMI Calculator. You may use slider for height and weight selection.
The main screen (activity) of the app. must provide a method to select one of the two apps offered. You can use two buttons or two images to offer the selection.
The app. must,
- Have a total of three different activities.
- Properly support orientation changes. Specifically, it should not lose values/state information.
All code snippets must be commented.
Task 2
The Android developer documentation describes an Intent as follows:
"Activities in Android are activated through messages called intents. Intent messaging is a facility for late run-time binding between components in the same or different applications. The intent itself, an Intent object, is a passive data structure holding an abstract description of an operation to be performed."
Briefly answer the following questions within the context of the above information:
(a) Why is the intent messaging facility considered as a late run-time binding between components?
(b) What are the contents of the passive data structure (of an intent)?
(c) Why is the word "passive" used for the intent data structure? (Hint: What is the responsibility of an Intent object? Do they have any inherent intelligence built into them?)
(d) Use an example to better explain the sentence "abstract description of an operation to be performed".