Quick Links

Prerequisites

This requires some tools. Please ensure you have the following tools:


Obtaining the source code

The sourcecode is available as a git repository at https://github.com/GeoODK/collect

To load the project in Eclipse start Eclipse now. Switch to the GIT-view by clicking on the icon in the upper right corner of Eclipse. If the icon is not there, go to the menu Window -> Open Perspective and click on Other...


Now in the opening window select Git. If the option Git is not present, make sure you have the Git team plugin installed.


The next step is to clone the repository on your computer. Start by clicking the clone icon. Enter the repository URL in the Clone Git Repository dialog.

  • URL: https://github.com/GeoODK/collect
  • Host: github.com
  • Repository path:/GeoODK/collect

Click Next to continue.


On the next page of the dialog select the master branch to check out.

Click Next to continue


Now select a location on your computer where the cloned repository will be stored. Also activate the setting Import all existing projects after clone finishes.

Click Finish


After the cloning process has finished the new repository is shown in the Git perspective. Since the projects were imported after cloning automatically you can now switch to the Java perspective by clicking the icon in the upper right corner of Eclipse.


If you get some errors, or maybe the project icon has a red exclamation mark next to it, first make sure the errors are caused by a missing library. Therefore right click the project and select Properties. Then Select Android and scroll down all the way through the settings on the right side of the screen. If you see a red x as in the screenshot, do the following.


Open the import project dialog by opening Menu File → Import


Select Android > Existing Android Code Into Workspace.



Navigate to your android sdk folder (this is located in C:\Program Files (x86)\Android\androis-sdk per default) and into the folder extras\google\google_play_services\libproject. On selecting this folder you should now get the project google-play-services_lib as in the screenshot above. Click Finish to import the project.


Now right click the GeoODK_Collect project, go to properties and select Android. Scroll all the way down in the settings page on the right. Select the one entry from the library list and remove it. Then click add and select the google play services lib from the list.


Add the correct google-play-service-lib


You should now see the library marked with a green tick mark.

Click Apply and OK to confirm the settings. You should now be able to run the project. If there are some errors try cleaning the project (Eclipse menu: Project – Clean…)


Compiling GeoODK with forms

You can also add forms to your build of GeoODK. These forms will be always available in the app and cannot be deleted.

Including forms to GeoODK is very easy. To achieve this just copy your xml forms into the folder assets\forms inside the project’s directory. If these folders don’t exist in your project’s directory simply create them, there are no further steps required.


When you run the app and select Collect Data in the app’s main menu you should see the forms you added after short loading time.