计算机科学论文代写 Agile Software Development On The Android Platform

8年前 890次浏览 计算机科学论文代写 Agile Software Development On The Android Platform已关闭评论 , ,

4.1.3. Count the speed (in miles/hr)

Priority: Mandatory

Tasks

The Application will use the accelerometer API's and GPS coordinates to calculate the distance walked by the user.

The location of the user when he starts walking and the location when he stops will be calculated and the distance between these two will be calculated.

To calculate the absolute distance travelled by the user. The location of the user will be captured  at regular time intervals.

4.1.4. Database storage of all the information stored by user:

Priority: Optional

Tasks

All the information like settings, location data, distance travelled, calories burnt etc will be stored in persistent database. SQLLite database will be used for this purpose.

4.1.5. Develop an algorithm which will indicate the users of the half-way point of a particular walk.

Priority: mandatory

You need an activity diagram that show the flow through the system. I would also suggest a class diagram because you have included a detailed discussion of the classes below.

MainActivity:

As soon as the user starts the pedotrac application the "MainActivity" which is a class is initiated.

The user then has to hit the settings button and enter necessary details like "Height", "weight" and number of miles to travel "Miles". After entering the details the user has to hit "submit" button.

If the user accidentally hits the "submit" button without entering the necessary details, a "toast" with message "Please enter the details" pops up.

After the user has successfully entered the details, they are stored for the present session using shared preferences. A service "step service" is then called, which takes care of counting the steps.

Once user hits "reset", all the values entered and all the values calculated are reset to "zero".

All the menu items like "Pause", "Resume", "Reset", "Quit" are instantiated and handled in the "MainActivity" class.

4.2.1. "Menu" Items:

"Pause":

When the user hits "pause" button, the step service is unbind and stopped.

"Resume":

When user hits "Resume" button, step service is first started and then bind.

"Reset":

Reset values are performed, when user hits this button.

4.2.1.4. "Quit":

This button stops "step service" and quits the application.

Map activity is also instantiated in "MainActivity" itself. When user hits "Map" button, "MapActivityTest" class is initiated and "activity" of "map" is started.

StepService:

As per developer.android.com services are defined as "A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use"[*].

"StepService" handles the counting of steps and different services required for this purpose, such as "wake_lock" of power service.

"StepService" is initiated when the user enters the details of settings and hits "submit" button.

Once it is initiated, power service is fired up and "wake_lock" is achieved, which keeps the phone in "wake" mode and never lets the phone go into sleep mode. This helps in uninterrupted service from "StepService".

Notifications such as "pedotrac is started" or "pedotrac is stopped" are shown when step service is started or stopped. So these notifications are handled in "StepService" class.

Passing of values of steps changed is taken care in this "StepService", since counting of steps is instantiated in this service.

StepDetector:

When "StepService" starts all sensors required for counting steps such as accelerometer, magnetic field, orientation, delay sensors are started and necessary values such as sensitivity is set.

"StepDetector" class uses these sensors by implementing "SensorEventListener" calculations and finds out if there is a movement in these sensors and if there is such movement, then that is counted as 1 step and value is passed onto "StepListener".

StepDisplayer:

"StepDisplayer" is used to increment values by '1' when movements are counted by step detector. These values are acquired from "StepListener".

MapActivityTest:

This class is used for map activity that goes on in the application. The map is loaded once the "map" button on the main screen is hit by the user. This is loaded with the help of Google maps package for android.

Map view is set to satellite view, for better understanding of the places and surroundings.

Once the map is loaded, the current position (fine location) of the user is displayed, using GPS co-ordinates. A pinpoint is used to indicate the location.

Current position is determined using LocationManager.

Half way distance calculation:

As the user starts to walk, after half the distance set by the user in the "settings", intimation is given out in the form of an "alarm" and a "toast" (message) indicating "You reached half the distance".

For this purpose, "Haversines" formula for calculating distance using GPS co-ordinates between two points on earth's spherical radius is used.

Trigonometrical formula is

haversin (d/R) = haversin( ᶲ2- ᶲ1) + cos(ᶲ1) cos(ᶲ2) haversin(∆λ)

Technique used:

A toast is displayed as soon as the user hits the map button on the main screen. The toast is divided into two halves, first half on left indicates the actual distance travelled and second half on right indicates the half distance that is to be travelled by user, this distance is fetched from the details entered by the user in the "settings" along with height and weight.

For example, if the user enters 1 mile, the right half on the toast displays 0.5 miles.

As soon as the current distance is equal to the distance to be travelled, an alarm and a toast displaying "You reached half the distance" is indicated to the user.

The current distance is calculated even after the alarm rings and stops; this can only be stopped when user quits the application.

R.java:

R.java is an auto generated file by the android SDK, which contains references to resources stored in "res" (Resources) folder of the project.

The final product

Add screen shots here.

计算机科学论文代写 Agile Software Development On The Android Platform

这些您可能会感兴趣

筛选出你可能感兴趣的一些文章,让您更加的了解我们。