[ODK Developers] Code to extract forms from sdcard

The FormChooserList displays the list of forms in the system.

··· On Fri, May 25, 2012 at 7:10 AM, Karthik Alavala wrote:

Hi All,

I am new to java programming and so to the ODK. I am looking for the
code which extracts the forms and shows up all the forms that are
created, when the 'Fill in the Blank form' is clicked. I understand
that the forms will come from sdcard image but I couldn't find the
code which extracts the forms from the image. Can anyone please guide
me by giving the class file name?
What I want to do - based on the names of the forms, I would like to
distribute them into separate sections. For example, forms whose name
starts with 'A' will group into view 'A', 'B' into view 'B'.

Thanks,
Karthik

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

Hi Mitch,

Thanks for the reply. I am in the same page.
I understand the forms are loaded after this lines of code
...
mDiskSyncTask.setDiskSyncListener(this);
mDiskSyncTask.execute((Void) null);

But, I am looking for an object which contains the list of xml's so
that I can manipulate as per my requirement.

Thanks,
Karthik

··· On May 25, 1:48 pm, Mitch S wrote: > The FormChooserList displays the list of forms in the system. > > On Fri, May 25, 2012 at 7:10 AM, Karthik Alavala wrote: > > > Hi All, > > > I am new to java programming and so to the ODK. I am looking for the > > code which extracts the forms and shows up all the forms that are > > created, when the 'Fill in the Blank form' is clicked. I understand > > that the forms will come from sdcard image but I couldn't find the > > code which extracts the forms from the image. Can anyone please guide > > me by giving the class file name? > > What I want to do - based on the names of the forms, I would like to > > distribute them into separate sections. For example, forms whose name > > starts with 'A' will group into view 'A', 'B' into view 'B'. > > > Thanks, > > Karthik > > -- > Mitch Sundt > Software Engineer > University of Washington > mitchellsu...@gmail.com

The forms on the sdcard are parsed and the descriptive information is
loaded into the FormsProvider, (a ContentProvider) which is backed by an
SQLite database (/sdcard/odk/metadata/forms.db).
The parsing is very time consuming, so you would never want to do that
parsing in the UI thread.

The FormChooserList and FormManagerList retrieve the set of available forms
from that FormsProvider.

You can search for places where records are inserted or updated into the
FormsProvider, and modify those submission accordingly.
i.e., you will likely want to add an additional column to the FormsProvider
with the category information you are trying to define.
Then tweak the display in the FormChooserList and FormManagerList.

During the form download sequence, the list of forms available for download
is presented in the FormDownloadList, which shows the formList data
retrieved from the OpenRosa server (e.g., ODK Aggregate).
If you are interpreting the structure of the title, you would want to
modify that display too.

Mitch

··· On Fri, May 25, 2012 at 3:56 PM, Karthik Alavala wrote:

Hi Mitch,

Thanks for the reply. I am in the same page.
I understand the forms are loaded after this lines of code
...
mDiskSyncTask.setDiskSyncListener(this);
mDiskSyncTask.execute((Void) null);

But, I am looking for an object which contains the list of xml's so
that I can manipulate as per my requirement.

Thanks,
Karthik

On May 25, 1:48 pm, Mitch S mitchellsu...@gmail.com wrote:

The FormChooserList displays the list of forms in the system.

On Fri, May 25, 2012 at 7:10 AM, Karthik Alavala karthik.alav...@gmail.comwrote:

Hi All,

I am new to java programming and so to the ODK. I am looking for the
code which extracts the forms and shows up all the forms that are
created, when the 'Fill in the Blank form' is clicked. I understand
that the forms will come from sdcard image but I couldn't find the
code which extracts the forms from the image. Can anyone please guide
me by giving the class file name?
What I want to do - based on the names of the forms, I would like to
distribute them into separate sections. For example, forms whose name
starts with 'A' will group into view 'A', 'B' into view 'B'.

Thanks,
Karthik

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

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