Android App Development
Android App Development
Contents
Objective:..............................................................................................................2
Introduction:.........................................................................................................2
Specifications:.......................................................................................................2
Buttons:.................................................................................................................9
Errors:.................................................................................................................10
Conclusion:.........................................................................................................10
Code Snaps:........................................................................................................11
References...........................................................................................................13
List of Figures
Figure 1: Property List Page................................................................................3
Figure 2: Details Page...........................................................................................4
Figure 3: Add New Property.................................................................................5
Objective:
The objective of this Android app development project is to create a mobile application called
"Property" that lists properties available for sale. The primary learning outcomes targeted by
this project are:
1. [Learning Outcome 1]:
Android apps can be written in Kotlin, Java, or C++. They are compiled into APK or
Android App Bundle files. APKs are for device installation, while Android App
Bundles are for publishing and generate optimized APKs on Google Play. Each
Android app operates in its secure sandbox, with unique user IDs, isolated processes,
and limited permissions. Apps can share data if they have the same user ID and
certificate. They can access device features with user-granted permissions.
2. [Learning Outcome 3]:
The key learning outcomes include:
Setting up Android Studio for app development.
Customizing the user interface with Jetpack Compose.
Personalizing text and background colours.
Navigating Android Studio and project file structures.
Building a simple, interactive app for Android devices.
(Android Developers, 2023)
Introduction:
This documentation outlines the design and development process of the "Property" mobile
application, which aims to provide users with a comprehensive list of properties available for
sale. The purpose of this project is to apply the knowledge and skills gained in the Android
App Development course by creating a real-world application. This project will serve as an
opportunity to demonstrate our understanding of the course's learning outcomes while
building a useful and functional mobile application. The scope of this project includes the
conceptualization, design, development, and testing of the "Property" mobile app. It
encompasses both front-end and back-end components, ensuring a user-friendly interface and
reliable data management.
Specifications:
Application Structure
The application is structured into three main screens or pages:
1. Properties List Page
Displays a scrollable list of properties for sale using a RecyclerView.
Each property is represented as a list item, showing street address, suburb,
state, postcode, and sale price.
Users can click on a property to view its details and make edits.
AndroidManifest.xml
The AndroidManifest.xml file is a crucial configuration file for an Android app. It contains
metadata about the application, such as the app's package name, permissions, activities, and
intent filters.
In this file, activities, services, and permissions required for the app are declared. For this
application, we should have entries for both the MainActivity and any other activities that
have been created.
MainActivity.java
The MainActivity.java file is the entry point of the Android application. It defines the
behaviour of the main activity, including the layout initialization, handling user interactions,
and managing the RecyclerView for the Properties List Page. In this file:
The RecyclerView is initialized in the onCreate method.
Initial property data using PropertyData (assuming this is a class to manage property
data) or other data source is loaded.
Io open the Details Page when a property item is clicked, item click listeners is set up.
After editing property details navigation back to the Properties List Page is handled.
PropertyData.java
The PropertyData.java file is a custom class that manages property data for the application. It
can include methods for loading, updating, and storing property information. In this file:
Data structures or collections are defined to hold property information.
Methods are created to add, retrieve, and update property details.
Logic is implemented to store and manage property data, such as using lists,
arrays, or database operations.
ExampleInstrumentedTest.java
ExampleInstrumentedTest.java file is typically used for writing instrumented tests for our
Android app. These tests verify that our app functions correctly on a physical or virtual
device. In this file we have written instrumented tests that check the functionality of various
parts of our app, such as:
Testing user interactions, like clicking on a property in the RecyclerView.
Verifying that property details are displayed correctly on the Details Page.
Ensuring that editing property details updates the data source accurately.
(StackOverflow, 2023)
Buttons:
Errors:
When the "Save" button is selected, the application performs error checks. A toast message is
shown with an error message if any of the following conditions occur:
1. The address or suburb field is empty.
2. The price is not a whole number and is less than 1000.
If an error has occurred, the application will remain on the New Property Details Page,
allowing the user to correct the input.
(GitHub, 2023)
Conclusion:
The Android Property Listing App is now complete, featuring a Properties List Page, Details
Page, and Add New Property Page with error handling. Users can effortlessly manage
properties while maintaining data integrity through informative error messages.
Code Snaps:
PropertyCreateFragment.java
PropertyDetailsFragment.java
ProjectListFragment.java
References
Android Developers, 2023. Android mobile App Developer tools. [Online]
Available at: https://developer.android.com/
[Accessed 30 08 2023].