Page 1 of 7 Assessment 3 — Android Programming — Term 1 2020 Due date: Electronic submission via Moodle by 11.45pm AEST, Friday, Week 12, 5 June 2020 ASSESSMENT Weighting: 20% of total unit assessment...

1 answer below »
Please find the attachments below.


Page 1 of 7 Assessment 3 — Android Programming — Term 1 2020 Due date: Electronic submission via Moodle by 11.45pm AEST, Friday, Week 12, 5 June 2020 ASSESSMENT Weighting: 20% of total unit assessment 3 Length: As required Objective This assessment requires you to add email, http and Google maps to the MusicPro application. Introduction You are required to add the following features to the MusicPro applications 1. Send an invitation to the current venue in the details view by opening the share facility and loading the email with a title and body text 2. Fetch the details of the weeks top-rated venue from a remote web server using HTTP 3. Add a new activity that displays Google Maps with a marker for the top-rated venue Project Requirements • You must start with the assessment 1 solution provided • You must not use any techniques that were not covered in the tutorials Violating either of these requirements may result in the submission receiving a mark of zero. 1. Email Message • Update the Details Page to include a Send Invitation button as shown below. Page 2 of 7 • Set the email title to be Invitation • Set the email body to be You are invited to venue_name_here • If the venue has an openning time append the text tonight at venue_opening_time_here • Open the chooser to select the send application • The button should not respond if the name or address is empty See share and email example below Page 3 of 7 NOTE: You do NOT need to open the contact list to select a recipient Page 4 of 7 2. Fetch Top-Rated Venue You are to establish a http connection to the following URL and download the JSON file using an AsyncTask. The JSON file will provide the details of the top-rated venue. http://jellymud.com/venues/best_venue.json The JSON data will be in the following format. { "name" : "Salt House", "address" : "The Pier, Cairns", "lat" : -16.9184416, "lon" : 145.7810191 } Complete the following tasks: • Copy the FlickrFetchr class file to your application • Rename FlickrFetch to VenueFetchr • Modify it to download the venue details and return a single venue object • Execute the AsyncTask thread when the application starts to fetch the top-rated venue Page 5 of 7 3. Google Map Complete the following tasks: • Create a new Map Activity • Open the map activity from the Map button on the main page • Pass the downloaded top-rated venue to the map activity Set the following: • Position (center) the map on the location of the top-rated venue using its latitude and longitude • Zoom to a factor of 14 • Display a marker at the venue location • Display the name of the venue when the user clicks on the marker Page 6 of 7 Google Maps 1. Creating a New Google Maps Key You can create a new Google Maps Key but be aware you have a limit of 5 keys. To create a new Google maps key for this app (note that you have a limit of 5) • Ctrl + click on the link in google_maps_api.xml • Follow the same procedure we did in the tutorial 2. Reusing Your Tutorial Google Maps Key If you wish to reuse the key from the tutorial • Ctrl + click on the link in google_maps_api.xml • Do NOT click Create New Project => Continue as we did previously • Click Select a Project from the top left on the menu bar The projects will have random names so if you have more than one you may have to check out the contents to match the key you want to reuse • Select a project from the dropdown and the name will change in the dropdown o Note that nothing else will change • Select the three horizontal lines to expand the menu • Select APIs & Services => Credentials • Check the creation Date and the Key to match the key you want to reuse • Click Edit (the pencil) on the right of the API key entry • In Key restrictions => Application restrictions select None • Select Save Problems with Google Maps If you have problems with Google Maps try the following In your Android Studio project • Uninstall the app on the phone • Select Build => Clean • Select File => Invalidate Caches / Restart => Invalidate and Restart Page 7 of 7 Submission You are required to submit your assignment electronically via the Moodle course website. The deliverable is a zip folder containing all the code and resources needed for to run the program. The file must be created using File => Export to Zip File The zip must be called lastname-firstname-studentId.zip Assessment Marking Criteria Component Criteria Marks Email Email opened for sending from new button on details page 1 Email does not open if name or address are not present 1 Chooser is opened (specified in the intent) 1 Title and body text correct 1 HTTP Top-rated venue retrieved from specified URL using modified FlickrFetchr 2 Threads AsyncTask implemented correctly in main activity to fetch venue 2 AsyncTask executed correctly on start up 1 JSON Parse method correctly decodes and returns a Venue object 2 Google Map Google Maps added as new map activity 1 Map activity opens from main page 2 Imports and permissions set correctly 1 Map is centered on top-rated venue and zoom is set correctly 1 Marker is set to venue location with title displayed when clicked 1 Coding Style Appropriate naming conventions, adequate commenting, well formatted 2 Submission Zip file generated using File/Export to zip (entire project not zipped) and file is named as specified 1 Total 20 Note: 1. Submissions must not use code or techniques that have not been covered in this subject 2. Submission must be created from the project provided Assessment 3 — Android Programming — Term 1 2020 Introduction Project Requirements 1. Email Message 2. Fetch Top-Rated Venue 3. Google Map Google Maps 1. Creating a New Google Maps Key 2. Reusing Your Tutorial Google Maps Key Problems with Google Maps Submission Assessment Marking Criteria Android Programming: Part 2 Assignment Guide Email, HTTP, AsyncTask, and Google Maps Introduction This assessment requires you to build on the first assessment. You are to use the assessment 1 solution project supplied. Read the assessment specifications for more details. Note that this is a general guide not a detailed solution to the assignment. 1. Email For this task you are to add a button to the details page to send an invitation email. · Add the email button to the details page layout · Add a method to the details fragment to create the email invitation message · Add the email button onClick() method · Create the ACTION_SEND intent (with chooser enabled) and start the chooser activity Use the week six tutorial project as a guide for this section 2. HTTP For this task you will download details for the top-rated venue in JSON format from the specified URL. · Use the week 7 tutorial project as a guide for this section Add the FlickrFetch.java from the PhotoGallery tutorial project to your project and rename it VenueFetchr. Remember to copy and paste into Android Studio and not drag · Leave getUrlBytes() and getUrlString() as they are VenueFetchr : FetchItems() · Remove the 8 lines of the Uri builder as we do not need to append parameters · Simply set the URL string to the specified URL http://jellymud.com/venues/best_venue.json VenueFetchr : ParseItems() Note that this method returns the results by reference. We only want to return a single venue rather than a list of gallery items · Change the method parameters to suit · Remove the loop and the JSONArray variable (as we only have one venue to decode) · Set the venue object attributes from the JSONObject MainActivity.java Using week 7 PhotoGalleryFragment.java as a guide · Add a FetchItemsTask (AsyncTask) to your main activity · Execute the AsyncTask in onCreate() Android Manifest.xml Using the Week 7 project and tutorial document as a guide · Add the necessary network permissions · Remember that if you run it before asking permission you will need to uninstall the app and run it again There is one additional permission you need to add otherwise Android will not access a non https domain. · Add the following at the end of the application tag (within the tag not after it) 3. Google Maps Add a new Google Maps activity to the project Use the week 10 tutorial project as a guide to complete the following. · Set permissions as per tutorial documents · Set apache legacy in manifest as per tutorial documents · See appendix for reusing your google map key (see tutorial document if you do not have one) · Add Google play-services to your gradle file as per the tutorial document · Remember to select sync · Remember that if you run it before asking permission you will need to uninstall the app and run it again Passing the Venue · Make the Venue class serializable public class Venue implements Serializable · Start the Maps activity from the Map button on the Main page · Pass the top-rated venue to the Maps activity on start (it can be passed using Extras now that it implements serializable) · In onMapReady() set the position, zoom and marker
Answered Same DayMay 28, 2021

Answer To: Page 1 of 7 Assessment 3 — Android Programming — Term 1 2020 Due date: Electronic submission via...

Aditya answered on Jun 07 2021
136 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here