Microsoft Word - assignment1-2018.docx
Page 1 of 6
Assignment — Mobile Software Development
Due date: 11:50 pm AEST, Friday Week 6 ASSESSMENT
Weighting: 25%
1 Length: Less than 50 MB
Objectives
This assessment item relates to the learning outcome 1, 2 and 3. More specifically, to design and implement
a complex mobile application.
The objective of this assignment is for students to:
• Develop, test and maintain a mobile application using an integrated suite of mobile software
development tools. More specifically Android Java development is undertaken using Android Studio
and Android API's.
Introduction
You are assigned the task of creating a data logger to capture inventory location data in a mobile application
that stores the data in a local database. The app has fields to record data for items owned by the company
were the app is employed to capture time, location and condition data for items in the companies’ inventory.
After the name of the staff member entering the data is given, a page (fragment) is shown to record data
values for the items in the inventory. An entry consists of inventory data. When the Save Log Entry button
is pressed this data is saved locally in an application SQLDatabase. When the Show Log Entries button is
pressed a related page (fragment) is shown that list all the date/time, location and data entries made for that
item. We will refer to our app as InventoryLogs.
More details of these pages will be given in the sections below. You should also consult the weekly
lecture/tutorials on the Moodle website for help and more information on completing the assignment. The
tutorials contain step-by-step procedures for working through the assignment as well as some tips and extra
help and clarification of the specification. Make sure you read the lecture/tutorials on the Moodle website.
The specification of this app will be further refined in Assignment 2.
Mobile Application Home Startup Page
Fig. 1: Home page (fragment)
Page 2 of 6
The application start-up page (Home_fragment) is shown in Fig. 1. You are to implement this functionality
using the Android API. The application should be based on a single activity with multiple fragments used to
present various other views (fragments). The User name: TextEdit field is used for an employer authorised
to collected inventory information to enter information on subsequent pages (fragments). Only if a user name
has been entered does a click on the Next button result in switching to the inventory data entry page
(fragment). If no user name is entered the toast message shown on the right of Figure 1 should be displayed.
The inventory data entry page fragment/s is discussed in the next section.
Inventory Data Entry Page
The page has large text for the pages name, Inventory Item, at the top of the view area. In the figures below
the lines of data that are to be logged and saved are shown.
The line immediately below the title line has the text "Invoice# ", followed by an EditText field to enter the
invoice number with the hint Invoice number. This is followed by a button field with the label ADD ITEM.
Then there is the label Quality with a spinner that is used to select one of the possible qualities {"", "Failed",
"Poor", "Average", "Good"}. When the spinner is pressed a drop down list is shown and the selected item
displayed.The layout and a sample input is shown in figure 2.
The ADD ITEM button is used is used to add the invoice number and quality strings to an internal data
object that saves the values. The cu
ent time is added to this data when the ADD ITEM button is pressed.
The SHOW ITEMS button is used to present all the log entries in a list format as shown in the next section.
If a value (invoice number, time, or quality) does not have a value then a Toast e
or message must be
displayed indicating the problem, how to fix it, and the entry should not be saved. If the entry is saved an
appropriate dialog should be given.
Fig. 2: Vehicle variety data entry page (fragment).
SHOW ITEMS Page (Fragment)
This fragment contains a list view with each of the specific users invoice number, time, and quality entered
for every item entered shown as a list item. Every saved entry for that user is displayed in the list like this. A
user may have more than one entry during so multiple entries can appear in the list, as shown in figure 3 on
the right. At the bottom of the page is a button that returns the user to the invoice data entry page. Note this
uttons' text is customised with the name BACK TO ADD INVOICES.
Page 3 of 6
Fig. 3: Show log entry page.
Options Menu pages
A number of menu options should be shown, if the user presses the console Menu button, as shown in Fig. 4.
Fig. 4: Options menu.
If the user taps the Save Menu then all data in the inventory list should be saved to a SQLite database on the
mobile device. Typically this is done when the user finishes entering data for the day. When the application
is opened, this database is used to intialise previously saved inventory' logger entries to that given in the
database. Subsequently new values are added to the app as the user enters new data.
The Send all entries will be used for other purposes in the next assignment, but for now we will use it to
clear the cu
ent database of all inventory entries. This would typically be done at the end of the week.
Profile page
The Profile fragment UI is shown in the Fig. 5. A Username edit text field is supplied to enter their
username. Two text fields are also supplied so that the user can enter their associated password for this
username. When the Save profile button is pressed this data is to be saved in local variables (for use in the
next assignment) and the Home page (fragment) is shown. If the Cancel profile button is pressed the Home
page is returned to. The intention of this is to allow for authentication to a company database at a later stage
of development of this app.
Page 4 of 6
Fig. 5: Profile page.
Other Features
When the Send menu option is chosen the dialog shown on the left of the Fig. 6 is shown. If the "OK" button
is selected then the existing SQLite database is cleared of all entries along with the local objects used to save
the inventory entries. As a result, subsequently showing the list the inventory will present an empty list.
When the Android BackButton is pressed on the Android device the dialog on the right of the figure below
is presented. If the user taps the "Yes" button then the local inventory logs will be written to the SQLite
database before quitting the application. If the "No" button is tapped then the application exits without saving
any changes to the SQLite database. The intent is that when the user sends the data the database is cleared.
Fig. 6: Profile dialogs.
Page 5 of 6
Required Documentation
You are also to prepare a Word document. Your document should include an appropriate title page.
Your document should have two sections that address the hardware and software requirements and
application commentary given below.
Hardware and Software Requirements
Your document should:
• Create a list of mobile devices and manufacturers targeted for the application. You should state what
mobile devices where used to test the application and what version of Android is supported.
Application Commentary
Your document should:
• List the features you successfully implemented and those you were unable to successfully
implement; you should describe the problem in a few sentences and also
iefly describe anything
you attempted to do to get it to work. Your approach to identifying and attempting to fix these bugs
may gain you some partial credit for those features you were unable to implement.
• A description of any additional functionality you believe would be useful to add to this app should be
included. Explain what the features are, and how they would help to improve the app.
Submission
You are required to submit your assignment electronically via the Moodle course website. The deliverable
is a rar or zipped directory containing all the code and resources needed for testing. You must rar or zip
(or tar) together:
• Locate your Android Studio project and zip or rar this folder.
• Your Word document
The resulting rar or zip file should be submitted on the course website. Please note that you should use your
student number as the name for your rar or zip file when uploading to Moodle.
Page 6 of 6
Assessment criteria
Assignment
Component Criteria Marks Total
MainActivity file
- The onBackPressed() method display the Save dialog
- Pressing "OK" in the onBackPressed() method saves the SQLite
database and exits
- The A
ayList values are initialised from the SQLite database entries
on startup
3
Fragment files
- The time/date is added as required
- The spinner works as required
- The inventory log entries are saved by Add ITEM button
- E
ors are caught and appropriate messages displayed
- The profile page checks that the passwords match, no items are null
and returns to the inventory fragment
- Show items button works and shows all entries for that inventory and
eturns to the co
ect page (2 marks)
8
es/layout/xml and
other files
- Items on fragments are in the co
ect positions w.r.t. each other
- EditText items have the co
ect hints
- Labels are all as given in the specifications
- The inventory class exists and is co
ect
- The spinner has the values stored in the strings.xml file
5
Menu options
- The Profile menu is present and works as specified
- The Save entries menu saves the co
ect values to the database (2
marks)
- The Send entries menu option clears the SQLite database and the
inventory A
ayList
3