Difference between revisions of "Location 542"

From mn/ifi/inf5750
Jump to: navigation, search
(Time schedule)
 
(18 intermediate revisions by 4 users not shown)
Line 6: Line 6:
 
Where the DHIS2 android application previously have only utilized the on-device GPS by clicking a button for obtaining the user location and storing it, we want this button to open a Google Maps fragment with the ability to place markers that indicate the desired location. The map should be launched with a marker that point to the user's location by default, but which can be moved by clicking the map and be saved when the user clicks save. 
 
Where the DHIS2 android application previously have only utilized the on-device GPS by clicking a button for obtaining the user location and storing it, we want this button to open a Google Maps fragment with the ability to place markers that indicate the desired location. The map should be launched with a marker that point to the user's location by default, but which can be moved by clicking the map and be saved when the user clicks save. 
  
=== More information ===
+
See http://www.uio.no/studier/emner/matnat/ifi/INF5750/h15/group-projects/coordinate-picker/index.html for more information
http://www.uio.no/studier/emner/matnat/ifi/INF5750/h15/group-projects/coordinate-picker/index.html
 
  
== Group members ==
+
=== Group members ===
 
* Andreas Oven Aalsaunet
 
* Andreas Oven Aalsaunet
 
* Erik Vesteraas
 
* Erik Vesteraas
Line 15: Line 14:
 
* Øyvind Johansen Amundrud
 
* Øyvind Johansen Amundrud
  
== Architecture / technology ==
+
=== Git repo ===
'''Tools'''
+
https://github.com/evestera/dhis2-android-sdk
* Android Studio
 
* GitHub
 
'''Languages'''
 
* Java
 
* XML
 
  
== Link to Git Repos ==
+
== Summary of Requirements ==
https://github.com/evestera/dhis2-android-sdk
+
=== Functional requirements ===
 +
The user should be able to:
 +
* Choose his own location without loading map
 +
* See a map of his surroundings
 +
* See his own position on the map
 +
* Navigate by interacting directly with the map
 +
* Zoom in and out of the map
 +
* Cancel location the location choice
 +
* Easily get back to his own position on the map
 +
* See the coordinates for a chosen location
 +
 
 +
=== Non-functional requirements ===
 +
* Provided the device is connected to the internet, the map should load within 2 seconds
  
https://github.com/evestera/dhis2-android-trackercapture
+
== Decision Points ==
 +
This section summarizes decisions that were taking into consideration, their status and the reason.
 +
{| class="wikitable"
 +
!Decision to be made
 +
!Status
 +
!Further comments
 +
|-
 +
|The scope of this project is to improve the dhis2-sdk to enable dhis2 android-apps
 +
to utilize Google Maps for selecting coordinates. TrackerCapture and EventCapture both
  
https://github.com/evestera/dhis2-android-eventcapture
+
use the sdk for this, but only EventCapture can utilize the new functionality in the SDK without
  
== Link to sample android app ==
+
major modifications. This projects want to exclude TrackerCapture from the scope and instead
  
== Summary of Requirements ==
+
focus on the SDK and EventCapture.
Functional requirements
+
|Approved
*
+
|19.11.15:
 +
Approved by Erling Fjellstad
  
== Screenshots and screen flows ==
+
|-
 +
|Location 542-team have looked into the possibilities of caching Google Maps data, also
 +
on the request of the product owner. This would better enable users to use the map without having
  
== Documented learning during project ==
+
a stable internet connection. Unfortunately,  this violates the Google Map APIs Terms of Service where
General Android development
 
  
Knowledge about the DHIS2 system
+
its said: "[..] No caching or storage. You will not pre-fetch, cache, index, or store any Content to be
  
Collaborating as a diverse team
+
used outside the Service [..]"
 +
|Rejected
 +
|
 +
* Section 10.5.d - Intellectual property restrictions [https://developers.google.com/maps/terms]
  
== Suggested improvements to API ==
+
* Mobile Section [http://www.google.co.uk/earth/media/licensing.html]
The GPS coordinates should be stored in a different format in the database. The format should also be consistent for all applications that use such coordinates. As per now, the coordinates in the Tracker Capture app are stored as strings, and the coordinates in the Event Capture app are stored as doubles, or floats. A more apropriate postgresql format would be for example GeoData.
+
|}
  
 
== Time schedule ==
 
== Time schedule ==
Line 57: Line 76:
 
|-
 
|-
 
|Document features and architecture on Wiki
 
|Document features and architecture on Wiki
|
+
|
 
|
 
|
 
|-
 
|-
 
|Obtain understanding of DHIS2 android app
 
|Obtain understanding of DHIS2 android app
|
+
|
 
|
 
|
 
|-
 
|-
 
|Look into Google Maps API
 
|Look into Google Maps API
|
+
|
 
|
 
|
 
|-
 
|-
 
|Set up development environment
 
|Set up development environment
|
+
|
 
|
 
|
 
|-
 
|-
Line 84: Line 103:
 
|-
 
|-
 
|First bare-bone version of coordinate picker
 
|First bare-bone version of coordinate picker
 +
|✓
 
|
 
|
 +
|-
 
|
 
|
|-
 
|Uploadable as DHIS2 android app
 
 
|
 
|
 
|
 
|
Line 103: Line 122:
 
|-
 
|-
 
|Finished, if applicable also with mobile app.
 
|Finished, if applicable also with mobile app.
|
+
|
 
|
 
|
 
|-
 
|-
Line 122: Line 141:
  
 
=== Presentation: mid December ===
 
=== Presentation: mid December ===
 +
 +
== Screenshots and screen flows ==
 +
[[File:Screenshot menu.png|thumb]]
 +
[[File:Location 542 - Coordinate picker - lo-fi prototypes1.jpg|left|thumb|First lo-fi prototypes 1]]
 +
[[File:Location 542 - Coordinate picker - lo-fi prototypes2.jpg|none|thumb|First lo-fi prototypes 2]]
 +
[[File:Screenshot map.png|thumb]]
 +
 +
== Documented learning during project ==
 +
General Android development
 +
 +
Knowledge about the DHIS2 system
 +
 +
Collaborating as a diverse team
 +
 +
== Suggested improvements to API ==
 +
The GPS coordinates should be stored in a different format in the database. The format should also be consistent for all applications that use such coordinates. As per now, the coordinates in the Tracker Capture app are stored as strings, and the coordinates in the Event Capture app are stored as doubles, or floats. A more apropriate postgresql format would be for example GeoData.
  
 
== Login android: ==
 
== Login android: ==
 
Android 4
 
Android 4
* Server url: http://play.dhis2.org/demo
+
* Server url: [http://play.dhis2.org/demo https://play.dhis2.org/demo]
 
Android 5
 
Android 5
 
* Server url: https://apps.dhis2.org/demo
 
* Server url: https://apps.dhis2.org/demo
Line 131: Line 166:
 
* Username: android
 
* Username: android
 
* Password: Android123
 
* Password: Android123
 +
 +
== Link to sample android app ==
  
 
== Log ==
 
== Log ==
Line 149: Line 186:
 
* Integrate google maps API
 
* Integrate google maps API
 
* More UI design
 
* More UI design
 +
12.11.2015
 +
* Uploaded first low-fidelity prototypes
 +
* Making Google Map appear in eventcapture
 +
* Fixed Google Play Service dependancies
 +
16.11.2015
 +
* Enable back button on activity bar
 +
17.11.2015
 +
* Adding ok and cancel buttons and interaction to coordinatePickerFragment.
 +
* Changing button design to follow conventions
 +
* Bug fixing
 +
* App working with map and buttons
 +
* Successfully get coordinates by usin buttons
 +
18.11.2015
 +
* Ran in to issues with android technical limitations when using Google Play services
 +
* Working on solving issue
 +
* Misc bugfixing
 +
19.11.2015
 +
* Investigated architectural structure of TrackerCapture
 +
* Removed ActionBar when showing CoordinatePicker
 +
* Focus map on location of user, or existing coordinate data
 +
01.12.2015
 +
* Added the functionality of placing a Google Maps marker at the user's current location
 +
* Added some comments and removed unused imports

Latest revision as of 14:52, 15 December 2015

Project description

Android Coordinate picker

This project's goal is to improve upon the existing DHIS2-android applications by expanding their common SDK to include support for use of Google Maps. In the existing DHIS2-android apps location selection is limited to only capture the coordinates where the user is located, which features no map interaction at all. This project will implement functionality such as having a map based point-and-click coordinate selector for TrackCapture- and EventCapture apps, among others, so the user can specify coordinates without being in that location.

Where the DHIS2 android application previously have only utilized the on-device GPS by clicking a button for obtaining the user location and storing it, we want this button to open a Google Maps fragment with the ability to place markers that indicate the desired location. The map should be launched with a marker that point to the user's location by default, but which can be moved by clicking the map and be saved when the user clicks save. 

See http://www.uio.no/studier/emner/matnat/ifi/INF5750/h15/group-projects/coordinate-picker/index.html for more information

Group members

  • Andreas Oven Aalsaunet
  • Erik Vesteraas
  • Yaron Okun
  • Øyvind Johansen Amundrud

Git repo

https://github.com/evestera/dhis2-android-sdk

Summary of Requirements

Functional requirements

The user should be able to:

  • Choose his own location without loading map
  • See a map of his surroundings
  • See his own position on the map
  • Navigate by interacting directly with the map
  • Zoom in and out of the map
  • Cancel location the location choice
  • Easily get back to his own position on the map
  • See the coordinates for a chosen location

Non-functional requirements

  • Provided the device is connected to the internet, the map should load within 2 seconds

Decision Points

This section summarizes decisions that were taking into consideration, their status and the reason.

Decision to be made Status Further comments
The scope of this project is to improve the dhis2-sdk to enable dhis2 android-apps

to utilize Google Maps for selecting coordinates. TrackerCapture and EventCapture both

use the sdk for this, but only EventCapture can utilize the new functionality in the SDK without

major modifications. This projects want to exclude TrackerCapture from the scope and instead

focus on the SDK and EventCapture.

Approved 19.11.15:

Approved by Erling Fjellstad

Location 542-team have looked into the possibilities of caching Google Maps data, also

on the request of the product owner. This would better enable users to use the map without having

a stable internet connection. Unfortunately, this violates the Google Map APIs Terms of Service where

its said: "[..] No caching or storage. You will not pre-fetch, cache, index, or store any Content to be

used outside the Service [..]"

Rejected
  • Section 10.5.d - Intellectual property restrictions [1]
  • Mobile Section [2]

Time schedule

Milestone 1: November 8th 

Task Status Comment
Document features and architecture on Wiki
Obtain understanding of DHIS2 android app
Look into Google Maps API
Set up development environment

Milestone 2: November 22th 

Task Status Comment
First bare-bone version of coordinate picker

Milestone 3: December 4th 

Task Status Comment
Finished, if applicable also with mobile app.

Final delivery: December 11th

Presentation: mid December

Screenshots and screen flows

Screenshot menu.png
First lo-fi prototypes 1
First lo-fi prototypes 2
Screenshot map.png

Documented learning during project

General Android development

Knowledge about the DHIS2 system

Collaborating as a diverse team

Suggested improvements to API

The GPS coordinates should be stored in a different format in the database. The format should also be consistent for all applications that use such coordinates. As per now, the coordinates in the Tracker Capture app are stored as strings, and the coordinates in the Event Capture app are stored as doubles, or floats. A more apropriate postgresql format would be for example GeoData.

Login android:

Android 4

Android 5

All:

  • Username: android
  • Password: Android123

Link to sample android app

Log

03.11.2015

  • Set up the Wiki
  • Fork of the dhis2-android-sdk
  • Installed Android Studio
  • Tried to get Android Studio to work
  • Tried to understand SDK

05.11.2015

  • Got Android Studio to work
  • Explored existing code base
  • Updated the Wiki
  • Consulted with a DHIS2 Android developer
  • Made the first UI design sketches

11.11.2015

  • New fragment for picking coordinates
  • Integrate google maps API
  • More UI design

12.11.2015

  • Uploaded first low-fidelity prototypes
  • Making Google Map appear in eventcapture
  • Fixed Google Play Service dependancies

16.11.2015

  • Enable back button on activity bar

17.11.2015

  • Adding ok and cancel buttons and interaction to coordinatePickerFragment.
  • Changing button design to follow conventions
  • Bug fixing
  • App working with map and buttons
  • Successfully get coordinates by usin buttons

18.11.2015

  • Ran in to issues with android technical limitations when using Google Play services
  • Working on solving issue
  • Misc bugfixing

19.11.2015

  • Investigated architectural structure of TrackerCapture
  • Removed ActionBar when showing CoordinatePicker
  • Focus map on location of user, or existing coordinate data

01.12.2015

  • Added the functionality of placing a Google Maps marker at the user's current location
  • Added some comments and removed unused imports