That's exciting!
We're about to release Collect v2024.2 (probably the first week of July) and then want to spend some time laser-focused on offline Entities until we get a production-ready implementation ready.
That means we'll do our best to engage with high-level design discussions around this but won't review code for a little while.
Once offline Entities are complete, we'll start looking at having an interface to select an Entity and then launch a form in the context of that Entity as I described above. I think that will be a great time to engage in detail with what you'll have explored in support of an external app doing something similar. We can then figure out what overlap, if any, there is between the two.
Yes, that's my understanding. Finding out more about that process and how devs usually test these implementations would be very helpful. For example, is it reasonable to have an odk://
URL for testing and forks that uses the same code paths as a https://
URL that does get registered through the Play Store? Is there some other common practice?
I don't think a sideloaded APK would be an issue as long as it's signed with the ODK key. I think it's APKs signed with other keys that wouldn't work. Again, super helpful if you're able to verify that!
I think so. A decision point if taking this approach would be whether to use full paths like /data/entity_id
, /data/my_group/my_question
as keys or paths starting at the first form-defined node (entity_id
, my_group/my_question
) I'm a bit torn -- I like how explicit full paths are but if they're going to be user-visible it may be friendlier to be as concise as possible. Luckily this should be an easy one to change one way or the other. The one precedent we have is Enketo's way of doing defaults which does use full paths.
In fact, it may make sense to match Enketo's URL structure entirely: d[/path/to/node]=value&d[/path/to/node]=value
. Using a d
attribute with indexes clearly indicates which attributes are intended to be default keys and allows for other attributes to be specified, for example to configure a project. Square brackets used like this in URLs are not explicitly allowed in the spec, sadly, but are in common usage.
Some requirements:
- Messages should be as neutral with respect to workflow and server as possible. For example, not everyone uses projects or QR Codes. (something like: "ODK Collect is not configured yet, please configure it to get access to the "My Cool Form" form" -- could the primary action go to the Collect landing screen?)
- Messages should be as specific as possible. For example, it would be helpful to know the title of the form that was not found because maybe it hasn't been manually downloaded and the user can solve the problem.
Unfortunately, we don't currently have a way to to identify a Collect project from outside the app. I believe that means this functionality will either have to use the current Collect project and if it doesn't find the form, suggest that it may be in another project, or scan all active projects for the form_id and provide a picker if there's ambiguity.
Thanks for digging into this and engaging with us to find a way to get it in the core! I think we'll be able to figure something good out.