辅导COMP3059程序、 写作Programming程序

” 辅导COMP3059程序、 写作Programming程序COMP3059 – Mobile Device ProgrammingMDP Coursework 2 – Running TrackerSummarySpecificationApplicationReportPlagiarismAssessment CriteriaSubmissionHints TipsUsing Location / GPS trackingEmulating GPSSummaryIn this exercise you are required to build an Android running tracking application, and document its designand architecture in a report. This is an assessed exercise and will account for 40% of your final modulemark. This is an individual coursework, and your submission must be entirely your own work please payparticular attention to the section of this document regarding plagiarism. This is a sizeable and open-endedcoursework compared to the previous assessed exercises (labs and coursework). This document sets outgeneral requirements that your application should meet rather than specific instructions.Your application, source-code and report should be submitted no later than:Submissions should be made electronically via Moodle. Standard penalties of 5% per working day will beapplied to late submissions.SpecificationThe Quantified Self or life-logging movement has been around for a number of years, but advances inmobile and wearable computing have increased the ability of people to collect data about their physicalactivities. The most common of these track activity as it happens for fitness, health or gamificationpurposes, for example displaying comparisons with previous activities, keeping track of best time orlongest distances etc.ApplicationApplicationThe goal of this coursework is to design and implement a mobile application that functions as a basicRunning Tracker , in that it should allow the user to track their movement when they decide to walk, runor jog, principally by logging the change in physical location using GPS.The application should allow the user to inspect this data in a useful manner. The user might expect towant to be able to ask simple questions of the data such as how far have I run so far today?, how farhave I run this month? or have I run faster than my best time today?.Better submissions will provide functionality that will allow the user to annotate their data. They mightexpect to be able to tag a particular exercise activity as good, or bad, or note something about the weatherconditions, or they might want to associate a photograph with the exercise activity.At the minimum, your application should support the core functionality:Logging the movement of a user when they go running or walkingSaving the movement data in an appropriate mannerAllowing the user to inspect their data in an appropriate mannerYou may find the Open Source application RunnerUp a useful reference application for much of the corefunctionality.You may wish to extend your application to include the extended functionality:Allowing the user to annotate their data in a useful mannerThis could be notes, pictures, audio or video at di!erent stages of their walk/run.This could be other data sources (weather, AQI, etc) which is collected automatically during theirwalk/run. 辅导COMP3059作业、 写作Programming作业、Java语言作业 辅导、 写作Java程序作业Any additional functionality you think is relevant and usefulThis is your opportunity to be creative – but ensure that you are providing functionality that isrelevant!How you approach building this application is up to you, however in principle, appropriate use of all fourmajor Android application components is expected:ActivityServiceContent ProviderBroadcast ReceiverFor this reason, it is important to consider how the task can be broken down into multiple atomiccomponents, how they communicate with one another, and how their various lifecycles should interact.There is no requirement that your components will be accessed by components outside of the application,however it is good practice to consider how your components might be made available to other processesfor subsequent reuse.Some hints and tips regarding getting started with location services / GPS monitoring are provided below.Your application must be written in Java and make use of the Android SDK. There are no requirements totarget a specific Android API version, however you can assume that your application will be tested on anemulated device (1080 x 1920 420dpi) running Android API version 29 (Android 10.0).Your application should have appropriate comments and variable / class names, so that a reader can easilyunderstand how it works at the code level.Adding further additional functionality to the application is encouraged, as are, for example, di!erentinterpretations of what it means to log running you could consider walking, or other kinds of movementactivity as might be measured by sensors on an Android device however as always your applicationshould meet the above specification primarily. Indeed, an appropriate interpretation of the apps requiredfunctionality is an implicit part of this assessment.ReportYou should provide a report alongside your application that documents its design and technicalarchitecture, in particular providing a rationale for the components that you have implemented and theircommunication, and the behaviour of the application from the users point of view.The report should be at minimum 1000 words long, with a maximum length of 1500 words.There is no set structure for the report, however you may wish to include a diagram showing thecomponents and their relationships, and a short explanation of each one, for example how the task isbroken down into discrete Activity components, how and when Services are started, how data is abstractedfrom underlying storage etc.PlagiarismIMPORTANT NOTEUse of third party assets (tutorials, images, example code, libraries etc.) MUST be credited andreferenced, and you MUST be able to demonstrate that they are available under a license that allowstheir reuse.Making significant use of tutorial code while referencing it is poor academic practice, and will result in alower mark that reflects the significance of your own original contribution.Copying code from other students, from previous students, from any other source, or soliciting code fromonline sources and submitting it as your own is plagiarism and will be penalized as such. FAILING TOATTRIBUTE a source will result in a mark of zero and can potentially result in failure of coursework,module or degree.All submissions are checked using both plagiarism detection soware and manually for signs of cheating. Ifyou have any doubts, then please ask.Assessment CriteriaMarksAvailableApplication FunctionalityThe application meets the core Activity Tracker specification 25The application meets the extended Activity Tracker specification, including novelty andappropriateness15Application Structure and ImplementationImplementation and appropriate use of Android components 30Programming StyleThe application is easy to understand, with comments explaining each part of the code,correct formatting, and meaningful variable names10ReportDescription of the design and architecture 20Total 100Assessment CriteriaThe following areas will be taken into account for each part of the assessment:Demonstrating knowledge of the areaQuality of the concept, including appropriateness and noveltyQuality of the technological design, including appropriate use of soware design concepts, andappropriate good coding practice (abstraction, commenting, naming)Quality of the realization, including how well it works and elaborations over and above the basicrequirementsIncluding all of the above aspects, clarity of structure, quality of argument / evidence, and insight /noveltySubmissionThere are three seperate requirements for a complete submisison for this coursework:Report – You must submit a PDF named zy12345.pdf (where zy12345 is your student ID).Submit your report: CW2 – ReportSource Code – You must submit a ZIP file named zy12345.zip (where zy12345 is your student ID).This ZIP file should contain all the neccesary materials to build your application.Submit your source code: CW2 – Source CodeAPK – You should submit an APK file name zy12345.apk (where zy12345 is your student ID). TheAPK file should be a self-contained application that the marker can install on a (virtual and physical)android device in order to test the functionality of your application.Submit your APK: CW2 – APKYou must submit all three of these components for your submission to be considered complete. Failure todo so will result in a 25% deduction for each submission component that is missing from your completesubmission.Hints TipsUsing Location / GPS trackingThere are di!erent mechanisms for obtaining the location of the device, including GPS, Wi-Fi or cell-towersignal triangulation, and di!erent mechanisms for how this data can be accessed by the device.Increasingly Android is attempting to push this functionality into Google Play services (giving Google morecontrol over parts of the Android stack), and this provides a unified approach that fuses multiple locationsystems into one to provide an abstraction over multiple pieces of hardware and to reduce battery usage.This requires making use of an emulator with the Google APIs installed generally this will be a di!erentemulator system image. httpss://developer.android.com/training/location/receive-location-updatesThere is, however, a simpler approach that is perfectly adequate for this coursework, and that is to use theLocationManager system service to provide GPS (global positioning system) updates that reveal the userslocation. httpss://developer.android.com/reference/Android/location/package-summary.htmlAccessing location requires permission from the user:The LocationManager is a system service, and so needs to be retrieved from the service manager viagetSystemService . Then it can be passed an instance of a LocationListener that will receiveupdates from the GPS provider. The two other parameters specify the minimum frequency of updates (i.e.we can say that we want at most 1 update every 5 seconds), and distance between updates (i.e. we can saythat we only want to be told when the device has moved at least 5 metres). The fastest update frequencyfor GPS is around 1 second, and accuracy varies from a few metres upwards depending on environmentalconditions.uses-permission android:name=android.permission.ACCESS_FINE_LOCATION/…import android.content.Context;import android.location.Location;import android.location.LocationListener;import android.location.LocationManager;The MyLocationListener class receives these location events by implementing the LocationListener interfaceas follows:onProviderEnabled and onProviderDisabled methods are called when the user enables ordisables the GPS, and onStatusChanged gives information about the status of the GPS signal: httpss://developer.android.com/reference/android/location/LocationListener.htmlThe important method call is onLocationChanged , which reports the current location as it is measured,and provides a Location object that can be inspected to obtain WGS 84 latitude, longitude, altitude(elevation), reported accuracy of the signal etc. httpss://developer.android.com/reference/android/location/Location.htmlLocationManager locationManager =(LocationManager)getSystemService(Context.LOCATION_SERVICE);MyLocationListener locationListener = new MyLocationListener();try {locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,5, // minimum time interval between updates5, // minimum distance between updates, in metreslocationListener);} catch(SecurityException e) {Log.d(g53mdp, e.toString());}public class MyLocationListener implements LocationListener {@Overridepublic void onLocationChanged(Location location) {Log.d(TAG, location.getLatitude() + + location.getLongitude());}@Overridepublic void onStatusChanged(String provider, int status, Bundle extras) {// information about the signal, i.e. number of satellitesLog.d(TAG, onStatusChanged: + provider + + status);}@Overridepublic void onProviderEnabled(String provider) {// the user enabled (for example) the GPSLog.d(TAG, onProviderEnabled: + provider);}@Overridepublic void onProviderDisabled(String provider) {// the user disabled (for example) the GPSLog.d(TAG, onProviderDisabled: + provider);}}Note that geodesy and global positioning are incredibly complicated subjects in their own right – the Earthis in no way perfectly spherical, and we like to think of linear distances on a locally flat surface as opposedto degrees around the world however the Location class hides most of this from us. In particular thedistanceTo method will calculate the distance between Two points given as latitude and longitude:Emulating GPSIt is possible to complete this coursework entirely using the emulator there is no advantage to ornecessity of having a physical Android phone. There is also no expectation that you handle the everydaypractical details of GPS losing signal, inaccurate signals etc. You can assume that it will be tested on anemulated device with perfect GPS.The emulator provides a mock GPS device that feeds NMEA (latitude and longitude position updates) to thephone where they will be handled by the LocationManager as if they were real updates, via theextended controls menu. This can be found by clicking on the emulator side bar.Furthermore, the emulator can replay a series of GPS events from a GPX file (a standard log format formany GPS devices and applications). It is also possible to export from Google Maps to GPX.There are example GPX files have been uploaded to Moodle for use as real latitude and longitudepositions that can be played out.float distance = myLocation.distanceTo(someOtherLocation);如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导