首页 > > 详细

辅导留学生COSC2309/2347设计、数据库编程辅导、辅导数据库、数据库编程辅导、解析数据库编程

Mobile Application Development
COSC2309/2347 Semester 2, 2018

Assignment 2: GeoTracking App Extended
(30 marks)

You are to extend the GeoTracker Application created in Assignment 1 to
include a number of new features described below:

Functional Requirements

1. Local Database: The complete model (Trackable and Tracking Lists) are
to be persisted in a local SQLite database. Whilst the database can be
simple (in terms of normalisation), it must store all information about
Trackables and Trackings as discussed in Assignment 1. On application
startup it should read the contents of food_truck_data.txt and add
to the database if not already present. For efficiency you should maintain
your original in memory model which is synced (loaded) in onStart()
and saved/persisted in onStop()1. For cohesion, database functionality
should reside in classes separate from the model and controller classes.

2. Whenever a Tracking is edited/displayed from the Tracking List the current
location of the associated Trackable should be read “live” and displayed
from the TrackingService.

Context Aware (Location Based) Tracking Suggestions: Your app
should periodically (using a user specified interval e.g., 5 mins) suggest a
Tracking with your nearest Trackable (from the filtered Trackable list). It
will calculate this as follows (using the Google Distance Matrix API
described below). You should also provide an immediate “suggest now”
functionality.
NOTE: You should use either a JobService or the AlarmManager for
this periodic functionality.
Based on your current location and FOR EACH Trackable it will:
 Use the Distance Matrix API (see below) to calculate walking time to
the Trackable and determine if it is reachable during its stationary
period (i.e. if you leave now or sometime in the future is there time to
reach it while stationary?).

1 Alternatively you may wish to do this in the background for additional protection against data
loss but this is not required for the assignment
 From the viable candidates it will suggest the closest Trackable.
 If you choose to accept, it will add a Tracking, otherwise it will loop and
suggest based on next nearest Trackable until you either add a
Tracking, cancel or reach the end of the filtered Trackable list.

3. Google Distance Matrix API. You can get your own current location using
the GPS of the device. You already have the locations of all of the
Trackables (from the TrackingService) so you need some mechanism
to estimate the time to travel between these two locations (using walking
mode for this assignment). Google Distance Matrix API will be used for this
purpose.
This API is a REST based web service, which can be queried using
standard HTTP Get/Post requests and receives JSON formatted responses
(so as to not unnecessarily tie ourselves to Android APIs). Details on how
to use this service can be found in [1] and will be discussed further in class.
4. Display Route information on a Google Map: One of the licensing
requirements of using the Distance Matrix API is to display locations on a
Google Map. Android Studio provides a Google Maps Activity template you
can use for this purpose. You should use the Map to display the Route
information for a selected Trackable on a Map (you can just display the
intermediate points you do not need to graphically connect them).
5. Network Monitoring: Since your application can only perform. network
related operations (Distance Matrix API) when connectivity is available on
the device you should have a BroadcastRecever that listens for network
state. In addition to the previously described time interval you should
perform. a Tracking suggestion whenever network access becomes
available.
6. Tracking notifications: Display notification of upcoming Trackings (at user
specified time e.g. 5 minutes before you should leave based on the meet
time) with dismiss/cancel/remind in ‘n’ minutes options (where ‘n’ is another
user configurable setting). This notification should be displayed in the
Notification Area.

Additional Implementation Requirements
- All non-trivial I/O operations must be performed in a separate worker
thread (i.e. Not the UI Thread). Your implementation must have at least
one AsyncTask and one started Service (which can be an
IntentService).
- In addition to the database functionality specified above all user settings
(notification period, tracking suggestion frequency etc.) should be saved
using a mechanism other than SQLite e.g. SharedPreferences or a
file.
- Your User Interface must support all of the functionality presented under
the “functional requirements” section of both assignments (Assignments 1
and 2). As with assignment 1 you should aim for a simple/efficient user
interface design and can refer to the Android Material Design UI
Guidelines for more information [2].
- Your implementation must make efficient use of UI resources through
Styles, Themes and XML resources (such as Strings, Dimensions or
Colors)
- Your Target Android Version should be API 25 or higher (you must
implement runtime permission checking but can use Caspar’s
supplied code2).

Submission Instructions
- You MUST make use of the libraries provided by the default Android SDK API.
You must NOT make use of third-party libraries such as the Google Client
Libraries.
- Your project should be implemented using Android Studio and your project
exported as a compressed .zip archive before uploading to Canvas. Do not
use any other compression formats - use of other formats (e.g. tar.gz, RAR,
etc.) may lead to delays in marking and/or a deduction of assignment marks.


Important Regulations
- You are free to refer to textbooks and notes, and discuss the design
issues (and associated general solutions) with your fellow students on
Canvas; however, the assignment should be your own individual work (or
as a student pair as per assignment 1 rules).
- Where you do make use of other references, please cite them in your
work. Note that you will only be assessed on your own work so the use of
third party code is prohibited.

This assignment is due 9:00AM Mon. 8th October 2018 (start of week 12)
and is worth 30%. Late marks will be deducted at 10% of the total marks
per day up to a maximum of five days (after which assignments will no
longer be marked).

References:
[1] Google Distance Matrix API
https://developers.google.com/maps/documentation/distance-matrix/

[2] Up and Running with Material Design.
https://developer.android.com/design/index.html

2 This is the one exception of where you are allowed to use other/3rd party code in this
assignment!

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!