Will it be possible to have 2 separate ODK Collect installations in 1 device?

Will it be possible to have 2 separate ODK Collect installations in 1 device? This include:

  • Both are customized ODK Collect
  • Both have different Server URLs

As if both are separate apps. Will there be a problem for this setup?

You can't install 2 version of ODK.

2 Likes

@Abel_Melquiades_Call Although you can't install 2 separate copies of ODK Collect, I'm curious why you would want to do that. What high-level problem are you trying to solve?

1 Like

There is this app called Parallel Space which can be used to run multiple accounts of the same app.

3 Likes

Very interesting, Divya! And you can confirm that it works well with ODK Collect?

Yes, I can confirm that. I have tested this by using two different server URLs on both the apps.

4 Likes

@yanokwa two separate projects. 1 on-going, 1 bootstarting... Same people who collect data, different funders. A little complicated that's why 2 separate ODK Collect may be the solution.

@Divya_Rani I'm really interested on that implementation. I will find time to test it and get back to your answer and mark it as a solution once I have tested it. Again, thank you. playing Steve Carell gif

3 Likes

Hi @Abel_Melquiades_Call, the KoboCollect app is the very same as ODK Collect. You can use that like ODK Collect. I had both installed with different servers on my phone.

Might very clear naming of the surveys not be enough? If it is the same people, you can train them?

I do not recommend using ODK Collect and any derivative of ODK Collect (e.g., KoboCollect) on the same device without something like Parallel Space.

This is especially true with KoboCollect because it reads/writes from the /sdcard/odk folder that holds your form files and form database. It can and will corrupt those files.

2 ODK Collect using Parallel Space will work. So far on my tests, it worked fine for collecting and sending textual data. I haven't tried it with sending images or other media.

Thanks again @Divya_Rani

3 Likes

You're welcome :slightly_smiling_face:

Hi @yanokwa,
I did not know that! It had worked for me, but will avoid it in the future. Thank you!

1 Like

Re-opening this thread... @Divya_Rani's solution is a good way to go for temporary solutions. On the other hand, if you want 2 fully customized ODK Collects in 1 device without using Parallel Space, both may still be saving in the path /sdcard/odk/...

@yanokwa Is the path /sdcard/odk/... something editable via the source code? If so, which file?

Cheers!

But how can you install ODK Collect application twice without Parallel Space?

Look for the ODK_ROOT constant in the Collect class.

Thanks @LN for that. I've been looking for a day. Your answer was the shortcut.

@Anastes_Mp, it turns out you have to build your own ODK Collect and make sure the other one has a different package name (other than org.odk.collect.android) . I do not know if having just an android product flavor for it will work.

@Abel_Melquiades_Call If you're on Android, you can use Whistler. It's a security-oriented tool that does various things, but one of the them is data collection. And it's of course ODK-compliant.

On Whistler, you can add as many servers as you'd like in parallel. We implemented this solution specifically for the scenario you describe: different projects which require data collection at the same time, on the same device.

Full disclaimer: I make Whistler :slight_smile:

Update
I tried building a custom version of ODK Collect v1.13.0 using the so called product flavors.

Result
The custom flavor will not be able to work side by side with the original ODK Collect. Let's say your flavor is packaged as org.odk.collect.android.example and the installed ODK Collect is packaged as org.odk.collect.android, the two are incompatible.

One must rename the package name of the odk collect org.odk.collect.android into something e.g. org.example.collect.android such that you can implement an android product flavor for it that is installable side by side with the original ODK Collect.

Please, please, please note that if you have a fork of Collect running side-by-side with Collect, bad things might happen (e.g., file corruption). Moreover, if we change the DB structure on Collect, it will likely cause problems with your app.

Reposting this with updates (I don't think I could edit the original post)

@Abel_Melquiades_Call If you're on Android, you can use Tella (hzontal.org/tella). It's a security-oriented tool that does various things, but one of the them is data collection. And it's of course ODK-compliant.

On Tella, you can add as many servers as you'd like in parallel. We implemented this solution specifically for the scenario you describe: different projects which require data collection at the same time, on the same device.

Full disclaimer: I make Tella :slight_smile: