wiki:DeveloperGuidelines/Mobile/Android

Version 24 (modified by Fran Boon, 14 years ago) ( diff )

--

Android Development Environment

ODK Collect, an Android XForms client

Download Code

Install yet another SCM tool, HG Mercurial

  • defaults will suffice during setup

Get a local copy of ODK collect by checking out from Google Code.

Currently the best version to get is the NCSU branch:

hg clone https://vinbitr-odk-collect.googlecode.com/hg/ vinbitr-odk-collect

This includes:

Build

  1. Install Java JDK
  2. Install Android SDK
    • Download some platforms using the SDK Manager
  3. Install ANT, a cross platform Java build automation tool.
    • Download and extract Ant (1.8.1 at time of writing): http://ant.apache.org/bindownload.cgi
    • Create 'ANT_HOME' environment variable.
    • Add '%ANT_HOME%\bin' directory to 'PATH' environment variable (Windows syntax).
  4. Install Eclipse (tested with 3.6.1)
  5. Install Android plugin
  6. Import project into Eclipse (project name should avoid spaces)
  7. Right-click on folder & 'Build Project'

To deploy you'll need to create a self signed keystore and use the .apk packaging wizard (Right-click on project, menu Android tools, Export Signed Application Package), or use the configured Sahana Eden application downloadable from Android Market, enable accept self signed certificates to work with Sahana Eden demo site.

Editing Code

Follow the Build instructions above.

Can Run or Debug in the Emulator

Right-click on the project & select properties | Android to check the API revision used.

  • Base ODK Trunk can run on basic Android 1.5: API 3
  • SMS functionality requires Android 1.6: API 4
    • Does it fail gracefully on older API? (does compile at least still)

Branding

See jaxdroid's branch:

  • Edit /res/values/strings.xml
    <string name="app_name">Sahana Eden</string>
    <string name="default_server">https://demo.eden.sahanafoundation.org/eden/xforms</string>
    <string name="main_menu_details">Magnifying human resources with technology</string>
    <string name="main_menu_message">Sahana Eden</string>
    

References


BluePrintMobileClient

UserGuidelinesMobile

Note: See TracWiki for help on using the wiki.