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:
You are assigned the task of creating a data logger to capture chicken data in a mobile application that stores the data in a local database. The app has fields to record scientific data for each of five varieties of chicken. If a chicken variety is selected, a page (fragment) is shown to record data values for that variety. An entry consists of chicken data. When the Save Log Entry button is pressed these data values are saved locally in the application in a SQLDatabase. When the Show Log Entries button is pressed a related page (fragment) is shown that list all the date/time and data entries made for that chicken variety. We will refer to our app as ChickenLogs.
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. So make sure you read the lecture/tutorials on the Moodle website.
The specification of this app will be further refined in Assignment 2.
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 views (fragments). The Foghorn, Little, Tweety, Hawk and Bertha buttons on the home fragment link to the daily page fragment/s discussed in the next section. The Previous, Next and Home buttons are used to navigate between the pages. From the Home page Previous will take you to the Bertha view and Next will take you to the Foghorn view. Pressing on Home will have no effect.
Foghorn, Little, Tweety, Hawk and Bertha Data Entry Pages
These pages all have a similar appearance and so only the appearance for Foghorn page will be shown, as in the figures below. The page has the large text for the chickens’ name, Foghorn, at the top of the view area. On the following 5 lines the data that is to be logged and saved is shown in the figures below.
The line immediately below the title line has the text “ID” with a text entry field below it with a text hint 1111-9999. Below this is the TextView with the text Weight (g): followed by a EditText with the hint 0.-10000. Following this is the TextView with the text Eggs laid: followed by a EditText with the hint 0-4. Below this is the Grain eaten (g): text line with an EditText with the hint 0-1000. Finally the text Water (ml): is followed by a EditText with the hint 0-200, as shown in figure 2.
The Save Log Entry is used is used to add the chicken id, day, time, weight, eggs, grain and water values to an internal data object that saves all values. The day and time values are to be automatically generated when the button is pressed. The Show Log Entries button is used to present all the chicken entries in a list format as shown in the next section. If a EditText has a value that is not in range or does not convert to the correct type then a Toast message is displayed and an error message appears in the field, as shown in the figure on the right. The type for the chicken id is integer, date is string, weight is float, for the eggs laid is integer, and for the grain and water values it is float. If the value entered is not in range, or cannot be converted to the correct type, a simple toast message is displayed.
The Previous button will take you to the preceeding chicken’s data entry page, the Next button will take you to the next chicken types data entry page. The Home button will take you to the Startup (Home) page.
This fragment contains a list view with the chicken varieties date-time information followed by the corresponding log values seperated by spaces, on one line. Every saved entry for that chicken variety is displayed in the list in date values order like this. In the Fig. 3 below one and two records have been shown for the Foghorn chicken type. At the bottom of the page is a button that returns the user to the chicken variety data entry page. Note this buttons’ text is customised with the name of the variety.
A number of menu options should be shown, if the user presses the console Menu button, as shown in Fig. 4.
If the user taps the Save entries Menu then all 5 chickens chicken id, date/time, weight, eggs laid, grain eaten and water values should be saved to a SQLite database on the mobile device. When the application is opened this database is used to intialise previously saved chickens’ chicken logger entries to that given in the database and then 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 current database of all entries. The Profile menu option is covered in the next section.
The Profile fragment UI is shown in the Fig. 5. A Logger username edit text field is supplied for the user 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.
When the Send all entries 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 chickens Chicken logger entries. As a result subsequently showing the list for any chicken 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 Chicken logger 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 the user controls what data is entered and only when send entries is pressed is the database cleared.
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:
Your document should:
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:
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.
|res/layout/xml and other files||
|Hardware/Software & commentary|
|Hardware / Software requirements||1|
Buy Online Assignment Help services for IT ASSIGNMENT with Punjab Assignment Help at firstname.lastname@example.org