Best way to open form in Collect from external app

I would recommend doing what you're describing -- accessing the form via
the content provider, then launching Collect using that information.

··· On Tue, Nov 13, 2012 at 7:53 AM, wrote:

Hi there, I'm currently adapting the ODK Collect source code to a project
I am working on. For this project I would like to have a "Task List" of
interviews to be completed for specific interviewees with their name listed
on the list. The user would then click on the name of the interviewee on
the list which would take them straight to the entry screen for the
appropriate form for that particular interviewee. In this context, I would
like to ask: What is the best way to call the FormEntryActivity for a
particular form (where we only know the name and ID of the form, not it's
URI), possibly pre-populating some of the values of the form in advance?
I'm tinkering with retrieving the appropriate URI for the form using the
ContentProvider and then calling FormEntryActivity with an Intent matching
that URI, but was wondering if there was a better way of doing this.

Thanks in advance!

Best,

Lu

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

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

And to pre-populate data, the easiest way is to pre-generate an saved
instance and pass that with the formID to collect. If you need an
example of how to do this, the ODK Tables source is a good place to
start looking.

··· On Tue, Nov 13, 2012 at 9:26 AM, Mitch S wrote: > I would recommend doing what you're describing -- accessing the form via the > content provider, then launching Collect using that information. > > > On Tue, Nov 13, 2012 at 7:53 AM, wrote: >> >> Hi there, I'm currently adapting the ODK Collect source code to a project >> I am working on. For this project I would like to have a "Task List" of >> interviews to be completed for specific interviewees with their name listed >> on the list. The user would then click on the name of the interviewee on the >> list which would take them straight to the entry screen for the appropriate >> form for that particular interviewee. In this context, I would like to ask: >> What is the best way to call the FormEntryActivity for a particular form >> (where we only know the name and ID of the form, not it's URI), possibly >> pre-populating some of the values of the form in advance? I'm tinkering with >> retrieving the appropriate URI for the form using the ContentProvider and >> then calling FormEntryActivity with an Intent matching that URI, but was >> wondering if there was a better way of doing this. >> >> Thanks in advance! >> >> Best, >> >> Lu >> >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en > > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitchellsundt@gmail.com > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en

Hello Yanokwa, what is the best way to pre-populate a bundle of data(using intents) from the external app to odk collect app?

https://docs.opendatakit.org/launch-collect-from-app has what we currently support. If you need to pass in data, I believe you'll still need to generate the instance first and put it in the odk folder and I am open to ideas on how to improve that process!