Form Launch

Hello, can you please help with the exact URI that is passed to
FormEntryActivity? I've tried the following:

file:///sdcard/odk/forms/ft2.xml
/sdcard/odk/forms/ft2.xml
/mnt/sdcard/odk/forms/ft2.xml
/sdcard/odk/.cache/29851333a38bb013fef70688fddac70b.formdef

Thanks, Mustafa

You would first connect to the Forms content provider and query that for
the form you want, then use the URI for that content item in the request to
ODK Collect.

This code from the create-shortcut activity shows this:
http://code.google.com/p/opendatakit/source/browse/src/org/odk/collect/android/activities/AndroidShortcuts.java?repo=collect#68
This issues an unrestricted query to get all forms registered with ODK
Collect. You would change it to apply a selection filter for the form you
want. Typically, this would be searching for the
FormsColumns.FORM_FILE_PATH matching the value returned by Java's
File.getAbsolutePath() method. Then follow the same steps in constructing a
form uri from that as shown in the above code, and invoke ODK Collect with
that URI.

Also, this code from ODK Tables:
http://code.google.com/p/opendatakit/source/browse/src/org/opendatakit/tables/activities/Controller.java?repo=tables#390
shows how to create a form, insert it into the Forms content provider, then
pass that URI into Collect to fill in a new blank copy of this form.

Mitch

ยทยทยท On Wed, Jul 11, 2012 at 1:23 AM, Mustafa Pirbhai wrote:

Hello, can you please help with the exact URI that is passed to
FormEntryActivity? I've tried the following:

file:///sdcard/odk/forms/ft2.**xml
/sdcard/odk/forms/ft2.xml
/mnt/sdcard/odk/forms/ft2.xml
/sdcard/odk/.cache/29851333a38bb013fef70688fddac70b.formdef

Thanks, Mustafa

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com