Assignment 2 – FedUni ISS Tracker


Assignment 2 – FedUni ISS Tracker
Due Date: 11:55pm, Sunday, 2nd June (end of Week 11)
This assignment will test your Android development skills and is worth 20% (Type A) of your overall course mark.
Android Development

This assignment requires you to develop a simple Android application which uses Google Maps, location services, and sensors. To write the application you will need to use the Android Studio Integrated Development Environment (IDE).
Your application must perform all tasks listed in this document and be capable of running on any Android device with a minimum API version of 23 (i.e. Android 6.0 "Marshmallow") up to the latest version of Android.
Your application should be created to display correctly on an emulated Google Pixel device (1080x1920 pixels in portrait orientation) - however, by using a ConstraintLayout the application should also be able to display correctly on any Android device with any sized screen and resolution.
Do not add any additional activities or features that are not outlined by the specifications to follow. You will not be marked higher for additional functionality, instead you may be penalized for not matching the program specifications!

Plagiarism Policy

The Federation University policy on plagiarism can be found at the following location: http://policy.federation.edu.au/university/student_plagiarism/ch01.php

I highly recommend that you familiarise yourself with what is and what is not considered plagiarism, but I'll summarise the key aspects below:
Do NOT share code with fellow students. I mean it. These are individual assignments, not group projects. If the same code is found in multiple students’ projects, you’ll be called in for a chat and risk getting zero for the assignment and having a plagiarism flag put on your record.

FedUni ISS作业代写、代做c/c++编程设计作业、代写Python/Java课程作业、代做Android Studio作业

You may, and are in fact encouraged to, discuss the project with your fellow students. The goal being that you understand how to create good, high-quality Android applications – and that understanding then flows into the exams where you'll be asked questions on Android application development. Just don't share projects/code – code it yourself, learn from your mistakes, and become a great developer.

Application Specification
Project Settings
Your Android application should have the following settings:
Minimum SDK: API 23
Target / Compilation SDK: API 28
Project/Application Name: FedUni ISS Tracker <YOUR_STUDENT_ID_NUMBER>
For example, FedUni Reddit Client 12345678
Company URL: au.edu.federation.itech3107.feduniisstracker<YOUR_STUDENT_ID>
For example, this would make the package name: au.edu.federation.itech3107.feduniisstracker12345678
Application Description
Your assignment is to write an Android application which will display the current location of the International Space Station (ISS) on a map, along with the location of the device itself. The app should utilise sensors so that the user can scroll the map by tilting the phone (e.g. phone tilts left, map scrolls left). The position of the ISS will be updated on a button click. In addition to the map, the latitude and longitude of both the ISS and device should be displayed in text form, the timestamp of when the ISS location was last updated, the current address of the device, and the distance (in km) between the device and the ISS.

Setting up the project
For this assignment, you should create a new project with the Google Maps Activity template (see Week 8). Follow the instructions in app > values > google_maps_api.xml to obtain a Google Maps API key. Once the key is generated you copy and paste it into the string resource “google_maps_key” – the one that has the default of “YOUR-KEY-HERE”. Once you do that and run the app on your device or even in the emulator, it will open to a map with a marker at Sydney.
You will also need to add Google Play Location Services into build.gradle:
implementation 'com.google.android.gms:play-services-location:16.0.0'

Layout
You will need to create a new layout (ConstraintLayout is recommended) and embed the map in it. You can add a map fragment to a layout as follows:
您需要创建一个新布局(建议使用ConstraintLayout)并将地图嵌入其中。 您可以将地图片段添加到布局,如下所示:
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Don’t forget to update the setContentView() method in onCreate() to point to the new layout. Leave the default code generated by the Map Activity template – you don’t need to do anything else with fragments to complete this assignment (fragments are covered in ITECH3106).
不要忘记更新onCreate()中的setContentView()方法以指向新布局。 保留Map Activity模板生成的默认代码 - 您无需对片段执行任何其他操作即可完成此分配(ITECH3106中介绍了片段)。
Activity 1 – The MapsActivity
This assignment requires only a single Activity, though you may be required to create additional classes to achieve the required functionality. The layout of the MapsActivity is displayed in Figure 1. It consists of the map (taking up half the height), several TextViews, and a button.
此分配只需要一个Activity,但您可能需要创建其他类来实现所需的功能。 MapsActivity的布局如图1所示。它由地图(占据一半高度),几个TextView和一个按钮组成。

Figure 1: The layout of MapsActivity.
Map
When the application is first loaded, the map should be loaded too (using the default code provided by the Map Activity template – though you should remove the default Sydney marker!). You are expected to do some additional research into the use of maps within Android in order to move the map when sensor events occur, and to display markers with custom icons.
首次加载应用程序时,也应该加载地图(使用Map活动模板提供的默认代码 - 尽管您应该删除默认的Sydney标记!)。 您需要对Android中的地图使用进行一些额外的研究,以便在传感器事件发生时移动地图,并显示带有自定义图标的标记。

Scrolling the map with sensors
A key feature of the app is that the map can be scrolled/moved by tilting the device. For example, assume the map state is currently identical to the map shown in Figure 2. If the device is tilted to the left and forward, the map should start scrolling towards India and Thailand. If the device is tilted downwards, the map should scroll towards Antarctica. When the device is placed onto a flat surface, the map should stop scrolling altogether.
To achieve this behaviour you will need to make use of sensors (see Week 7). The Android emulator comes with a suite of virtual sensors that you can use to test sensors such as accelerometer, ambient temperature, magnetometer, proximity, light, and more. There are detailed instructions available in the Android docs: https://developer.android.com/studio/run/emulator.html#extended.

Figure 2: A closer look at the map.
Refresh Button

public static String formatUnixTimestamp(long unixSeconds) {
// convert seconds to milliseconds
Date date = new Date(unixSeconds*1000L);
// set a format for the date
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");
// set the timezone
sdf.setTimeZone(TimeZone.getTimeZone("GMT+11"));
// return the formatted date
return sdf.format(date);
}

The distance in km should be calculated between the ISS and the user, and this value should be displayed in the relevant TextView. Hint: Explore the methods available in the Location class!
On repeated clicks of the Refresh button, the behaviour should repeat, but any map markers should be cleared first so that only the latest locations are displayed in the map. Figure 3 displays the text fields.

Figure 3: A closer look at the text fields.

Obtaining the current location of the ISS
To obtain the current location of the ISS you will need to connect to the following API:

Credit
Icons made by Freepik from www.flaticon.com are licensed by CC 3.0 BY

ITECH3107 Assignment 2 Marking Criteria
Student Name:
Student ID:
Requirement Weight Mark
Correct setup of the AndroidManifest.xml and build.gradle files
Marking: 5 = perfect, 2.5 = reasonable (some omissions), 0 = many omissions or not completed at all. 5
Generation and use of a valid Google API key
Marking: 5 = key generated and usable, 0 = no key generated 5
Correct construction and layout of the MapsActivity (i.e. contains all required elements which function as per the assignment specification)
Marking: 5 = perfect, 2.5 = reasonable (some omissions), 0 = many omissions or not completed at all. 5
Runtime permissions are handled correctly
Marking: 5 marks = perfect, 2.5 = some issues, 0 = not completed. 5
Location of ISS obtained from remote API
Marking: 10 = perfect, 5 = mostly / with issues, 0 = not at all. 10
Map markers and textual information is correctly displayed after refresh button clicked
Marking: 10 = perfect, 5 = mostly / with issues, 0 = not at all. 10
Sensor correctly used to scroll the map
Marking: 10 = perfect, 5 = mostly / with issues, 0 = not at all. 10
Location manager used to correctly obtain the current location of the device
Marking: 10 = perfect, 5 = mostly / with issues, 0 = not at all. 10
Location of device is correctly converted into a readable address

Marking: 5 = perfect, 2.5 = mostly / with issues, 0 = not at all. 5
Sensors and location services stopped/resumed using appropriate lifecycle callbacks
Marking: 5 = perfect, 2.5 = mostly / with issues, 0 = not at all. 5
General Weight Mark
Use of additional classes.
Marking: 5 marks = additional classes used where necessary, 2.5 = additional classes used with some issues, 0 = no additional classes used. 5
Correct usage of strings.xml to define all hard-coded text content.
Marking: 5 marks = all in xml, 2.5 = some in xml, 0 = none in xml. 5
Code style and comments.
Marking: 10 marks = beautiful code and layout, 5 = some good / some a bit rough, 1 = very poor. 10
Robustness of code (e.g. can I break it?)
Marking: 10 marks = highly robust, 5 = mostly robust but will occasionally break or behave unexpectedly in certain conditions, 0 = crashes and breaks easily. 10
Assignment mark total (out of 100)
Contribution to course (out of 20 marks)

因为专业,所以值得信赖。如有需要,请加QQ99515681 或邮箱:[email protected] 

微信:codinghelp

猜你喜欢

转载自www.cnblogs.com/returnjava/p/10927052.html
今日推荐