So I have a completely separate application and I would like to have the
option for the user to collect data with the ODK Collect app. (it is
assumed the that user already has ODK collect installed) I think im
missing something. I have also tried to look through the code for ODK
tables because I know that the two app talk back and forth. I really just
want to call ODK. Im not worried about returning back into my app.
This intent does not work.
Intent intent = new Intent("android.intent.category.LAUNCHER");
intent.setClassName("org.odk.collect.android","org.odk.collect.android.activities.FormManagerList");
startActivity(intent);
1 Like
Never mind I figured it out, it should be as the following.
Intent i = new Intent(Intent.ACTION_MAIN);
PackageManager manager = getPackageManager();
i = manager.getLaunchIntentForPackage("org.odk.collect.android");
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
ยทยทยท
On Friday, January 24, 2014 3:01:55 PM UTC-5, Jon Nordling wrote:
>
> So I have a completely separate application and I would like to have the
> option for the user to collect data with the ODK Collect app. (it is
> assumed the that user already has ODK collect installed) I think im
> missing something. I have also tried to look through the code for ODK
> tables because I know that the two app talk back and forth. I really just
> want to call ODK. Im not worried about returning back into my app.
>
> This intent does not work.
>
> Intent intent = new Intent("android.intent.category.LAUNCHER");
>
> intent.setClassName("org.odk.collect.android","org.odk.collect.android.activities.FormManagerList");
> startActivity(intent);
>
1 Like
Hi Jon, thank you for posting your own answer, I'm about to start something very similar.
do you by any chance know how to instruct ODK Collect about opening a specific form?