Difference between revisions of "Furunål"

From mn/ifi/inf5750
Jump to: navigation, search
(Project details)
(Solution 1: Inline map)
 
(50 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  
 
== Project description - Android coordinate picker ==
 
== Project description - Android coordinate picker ==
DHIS 2 features a module called Tracker, which can be used to track patients who participate in health related programs. Such programs may be Malaria treatment and follow up, or Pregnancy follow ups (ANC) to name a few. In some cases coordinates need to be captured, and in this task you will implement a map based coordinate picker on Android.
+
The task description can be found [http://www.uio.no/studier/emner/matnat/ifi/INF5750/h15/group-projects/coordinate-picker/index.html here]. They way we understand the project description, the problem we are going to solve is that currently the Tracker module of DHIS2 is only able to capture the coordinates of the current user. However, sometimes there is a need to capture coordinates of locations the user is not currently at, and this is what we are going to do. This is to be done by using a map and clicking on the position with the coordinates the user wishes to capture.
  
The Tracker module is divided into two categories. Anonymous events, or tracked entities.
+
In other words, we are implementing new functionality in the Tracker module.
  
Anonymous events may for example be death registration forms, or clinical surveys. This submodule in DHIS 2 is called "Event Capture".
+
== List of group members ==
 +
Martin Kolbeinsvik - martikol@ifi.uio.no
 +
 
 +
Jon-Robert Skårberg - jonrobes@ifi.uio.no
 +
 
 +
Sebastian Søberg - sebasso@ifi.uio.no
 +
 
 +
Daniel Bugajski - prezemyb@student.matnat.uio.no
 +
 
 +
== Summary of requirements ==
 +
 
 +
Features:
 +
 
 +
Register location from a point-and-click on a map ind the Tracker module
 +
 
 +
Architecture:
  
Examples of Tracked entity programs are Malaria follow up programs, school vaccination programs, or pregnancy followups. This submodule in DHIS 2 is called "Tracker Capture".
+
Google maps API
  
There already exist a web version and an Android version of these modules. You can test the web version by logging in to https://apps.dhis2.org/demo with username and password admin:district . You can test the Android version of the module by downloading either DHIS 2 Tracker Capture or DHIS 2 Event Capture from the Google Play store.
+
Android SDK
  
For logging in with Android use the same server, but use the username and password: android:Android123
+
== Time schedule ==
  
== Task definition ==
+
Wiki pages will be updated continuously and is not mentioned in the week schedule below. Milestones as described on the wiki front page can be found in the section below this.
Your task is to implement a map based point-and-click coordinate selector for the existing applications. It is currently possible to capture coordinates using the on-device GPS, and by clicking on a button. This does however only allow for capturing the coordinates the user is currently located at. In some cases the coordinates the user wants to capture are not accessible in person perhaps. One example we have been given is inaccessibility due to crocodiles or thugs near Malaria infested mosquito breeding sites.
 
  
You are to integrate this into the existing code base of the applications. The two applications share a core SDK, so it needs only be implemented once to work for both apps.
+
Week 45: Start project, write Wiki pages and familiarize with project (milestone 1).
  
Other parts of DHIS 2 already use Google Maps, and you may use it in your implementation.
+
Week 46: Familiarize with the DHIS2 system, testing and practicing with the system. Share experiences with each other, and start on the first bare-bone version (milestone two).
  
The source code can be found on the DHIS 2 GitHub directory (links follow).
+
Week 47: Continue work with and finish the bare-bone version by November 22th. (This is a minimum, as we hope to have had more progression than this on the 22th.)
  
https://github.com/dhis2/dhis2-android-sdk
+
Week 48: Starting the work with "translating" our work from static HTML to a proper DHIS2 webapp (milestone three. We intend to fill the requirements by the end of this week, as we do not yet really know how demanding this will be.
https://github.com/dhis2/dhis2-android-trackercapture
+
 
https://github.com/dhis2/dhis2-android-eventcapture
+
Week 49: Continue the work from last week. If we are finished with milestone three by this time, we start finishing the app. If not, we continue with finishing milestone three by the deadline on December 4th.
 +
 
 +
Week 50: Finishing project and wrapping things up. Final delivery December 11th. Create and practice on presentation.
 +
 
 +
== Task dividing ==
 +
We work mostely together as a group, sitting in the same room while discussing and working. We all do our share in most parts of the project, while doing the programming itself on one or two computers at a time.
 +
 
 +
== Delivery ==
 +
 
 +
=== Static versions ===
 +
[[File:Static-html-coordinate-picker.jpg|thumb|206x206px|Static HTML version]]
 +
==== Static HTML-version ====
 +
The static HTML-version is available on [https://github.com/Kolbeinsvik/coordinate-tracker GitHub].
 +
 
 +
Our project is Android-based and the final delivery will not be in HTML. However, we have made a small HTML-version were it is possible to set and move a `marker` in a Google Map and the latitude and longitude is displayed on top.
 +
 
 +
==== Static stand-alone Android version ====
 +
The Android version uses Google Maps. 
 +
 
 +
<div style="clear:both;"></div>
 +
 
 +
=== DHIS android sdk project ===
 +
 
 +
==== Solution 1: Inline map ====
 +
Repository: https://github.com/Kolbeinsvik/dhis2-android-sdk
 +
 
 +
===== Description =====
 +
An inline Google Maps is displayed when the map icon button is pressed. The map's default view is over Africa (latitude and longitude 0) and can be moved, rotated and zoomed by the user.
 +
 
 +
A marker can be added by the user by touching anywhere on the map. It can also be moved and dragged around by pressing and holding the marker for a second. Any location change on the marker changes the `Latitude` and `Longitude` fields and is automatically saved by the app.
 +
 
 +
On view of existing patient entry with location data, as well any update to the location fields due to pressing the "I am here" button, places an appropriate marker on the map.
 +
 
 +
[[File:Furunaal_map_button1.jpg|200px|View of where the button to open the map is]] [[File:Furunaal_map_view2.jpg|200px|The map view]]
 +
 
 +
===== Known issues =====
 +
An issue with `fragment` and the `LayoutInflator` crashes the app the second time the `CoordinatesRow` is rendered.
 +
 
 +
==== Solution 2: Map with intent ====
 +
Repository:  https://github.com/Kolbeinsvik/dhis2-android-sdk
 +
 
 +
New activity is started and Google Maps displayed when the map icon button is pressed. A marker is default placed over Africa (latitude and longitude 0) and can be moved and zoomed by the user. User can change the default location by touching anywhere on the map and the map view "follows" marker's location. Any location change on the marker, changes the `Latitude` and `Longitude` and is automatically saved by the app when <SET COORDINATES> or <GO BACK> button is pressed.
 +
 
 +
[[File:menubeforemap.png|200px|init menu without coords]][[File:mappopup.png|200px|after activity]][[File:menuaftermapsetscoords.png|200px|after activity]]
  
== List of group members ==
 
Martin Kolbeinsvik -
 
  
Jon-Robert Skårberg - jonrobes@ifi.uio.no
+
Starting a new Activity from CoordinatesRow.java on button click on the map icon.
  
== Summary of requirements ==
+
== Documented learning during project ==
 +
Our most obvious learning is that the DHIS2 SDK is very complex and takes a lot of time to understand before one can start working on it. We have by far spent more time on reading classes and documentation, than we have spent on actual coding. The first challenge was to find out where to actually start, but when we after a while found out that the java class CoordinatesRow were the place to start, it all went a bit more smoothly.
  
 +
We have also experienced that working with Android can be a bit cumbersome when two of the group members don't have any Android devices. Emulators have not always been very stable, and it would have been nice if this didn't take up as much of our time as it actually did.
  
== Time schedule ==
+
== Suggested improvements ==
 +
Of course, the app crashing the second time CoordinatesRow is rendered is unacceptable and should be fixed. We are unable to to this, but feel that our solution is decent if just that particular error is fixed.
  
 +
Another improvement related to the map would be to move the map viewport to center on the marker when location data already exist and when it is set by pressing the "I am here" location button. 
  
 
== Milestones ==
 
== Milestones ==
 +
Each group should follow these milestones:
 +
* Milestone 1: 8th November
 +
Document features and architecture on Wiki
 +
 +
Show understanding of DHIS2 web apps
 +
* Milestone 2: 22th November
 +
First bare-bone version - static HTML
 +
 +
Uploadable as DHIS2 web app
 +
* Milestone 3: 4th December
 +
* Finished, if applicable also with mobile app.
 +
* Final delivery: 11th December
 +
* Presentation: mid December

Latest revision as of 12:59, 14 December 2015

Project description - Android coordinate picker

The task description can be found here. They way we understand the project description, the problem we are going to solve is that currently the Tracker module of DHIS2 is only able to capture the coordinates of the current user. However, sometimes there is a need to capture coordinates of locations the user is not currently at, and this is what we are going to do. This is to be done by using a map and clicking on the position with the coordinates the user wishes to capture.

In other words, we are implementing new functionality in the Tracker module.

List of group members

Martin Kolbeinsvik - martikol@ifi.uio.no

Jon-Robert Skårberg - jonrobes@ifi.uio.no

Sebastian Søberg - sebasso@ifi.uio.no

Daniel Bugajski - prezemyb@student.matnat.uio.no

Summary of requirements

Features:

Register location from a point-and-click on a map ind the Tracker module

Architecture:

Google maps API

Android SDK

Time schedule

Wiki pages will be updated continuously and is not mentioned in the week schedule below. Milestones as described on the wiki front page can be found in the section below this.

Week 45: Start project, write Wiki pages and familiarize with project (milestone 1).

Week 46: Familiarize with the DHIS2 system, testing and practicing with the system. Share experiences with each other, and start on the first bare-bone version (milestone two).

Week 47: Continue work with and finish the bare-bone version by November 22th. (This is a minimum, as we hope to have had more progression than this on the 22th.)

Week 48: Starting the work with "translating" our work from static HTML to a proper DHIS2 webapp (milestone three. We intend to fill the requirements by the end of this week, as we do not yet really know how demanding this will be.

Week 49: Continue the work from last week. If we are finished with milestone three by this time, we start finishing the app. If not, we continue with finishing milestone three by the deadline on December 4th.

Week 50: Finishing project and wrapping things up. Final delivery December 11th. Create and practice on presentation.

Task dividing

We work mostely together as a group, sitting in the same room while discussing and working. We all do our share in most parts of the project, while doing the programming itself on one or two computers at a time.

Delivery

Static versions

Static HTML version

Static HTML-version

The static HTML-version is available on GitHub.

Our project is Android-based and the final delivery will not be in HTML. However, we have made a small HTML-version were it is possible to set and move a `marker` in a Google Map and the latitude and longitude is displayed on top.

Static stand-alone Android version

The Android version uses Google Maps.

DHIS android sdk project

Solution 1: Inline map

Repository: https://github.com/Kolbeinsvik/dhis2-android-sdk

Description

An inline Google Maps is displayed when the map icon button is pressed. The map's default view is over Africa (latitude and longitude 0) and can be moved, rotated and zoomed by the user.

A marker can be added by the user by touching anywhere on the map. It can also be moved and dragged around by pressing and holding the marker for a second. Any location change on the marker changes the `Latitude` and `Longitude` fields and is automatically saved by the app.

On view of existing patient entry with location data, as well any update to the location fields due to pressing the "I am here" button, places an appropriate marker on the map.

View of where the button to open the map is The map view

Known issues

An issue with `fragment` and the `LayoutInflator` crashes the app the second time the `CoordinatesRow` is rendered.

Solution 2: Map with intent

Repository: https://github.com/Kolbeinsvik/dhis2-android-sdk

New activity is started and Google Maps displayed when the map icon button is pressed. A marker is default placed over Africa (latitude and longitude 0) and can be moved and zoomed by the user. User can change the default location by touching anywhere on the map and the map view "follows" marker's location. Any location change on the marker, changes the `Latitude` and `Longitude` and is automatically saved by the app when <SET COORDINATES> or <GO BACK> button is pressed.

init menu without coordsafter activityafter activity


Starting a new Activity from CoordinatesRow.java on button click on the map icon.

Documented learning during project

Our most obvious learning is that the DHIS2 SDK is very complex and takes a lot of time to understand before one can start working on it. We have by far spent more time on reading classes and documentation, than we have spent on actual coding. The first challenge was to find out where to actually start, but when we after a while found out that the java class CoordinatesRow were the place to start, it all went a bit more smoothly.

We have also experienced that working with Android can be a bit cumbersome when two of the group members don't have any Android devices. Emulators have not always been very stable, and it would have been nice if this didn't take up as much of our time as it actually did.

Suggested improvements

Of course, the app crashing the second time CoordinatesRow is rendered is unacceptable and should be fixed. We are unable to to this, but feel that our solution is decent if just that particular error is fixed.

Another improvement related to the map would be to move the map viewport to center on the marker when location data already exist and when it is set by pressing the "I am here" location button.

Milestones

Each group should follow these milestones:

  • Milestone 1: 8th November

Document features and architecture on Wiki

Show understanding of DHIS2 web apps

  • Milestone 2: 22th November

First bare-bone version - static HTML

Uploadable as DHIS2 web app

  • Milestone 3: 4th December
  • Finished, if applicable also with mobile app.
  • Final delivery: 11th December
  • Presentation: mid December