-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for specifying a custom camera app for image questions #651
Comments
From the linked Collect discussion and the docs, it seems like it's possible to specify a custom image capture app already, using Current method, which can also pass parameters to the external app:
Proposed alternative, which would only specify the image capture app to open:
And for groups, users would still need to do it this way:
Not unique to this parameter but what does Collect do when users specify conflicting info, like this?
Shortcuts can be useful but is this an clear win? The costs of shortcuts are possible confusion from having multiple ways to do the same thing, often with reduced flexibility (DP 1,2), and ongoing software/docs maintenance (DP 2). The former was a theme at the XLSForm / XPath session at the summit this year. For the latter I am thinking of #592 and the large feature space in pyxform. |
Correct but this was implemented for so called external apps (not necessarily even camera apps) plus using the
We discussed both those options with @lognaturel not only in the issue (what you can read) but also during a 1on1 meeting and we like the option with parameters more. |
I think in this case the group level intent should be more important. I'm not 100% sure now but I think questions in a group with intent are read-only in a way that they can by populated by an external app but buttons/text fields in the questions are hidden or disabled and you can't add answers manually. So If it's one group it doesn't make sense to support different intents for different questions that are inside. |
Using an appearance with I guess one thing I hadn't thought about is that we could probably have extended the existing
@grzesiek2010 I think we did discuss eventually also adding the
Yes, definitely something to be very mindful of. My sense is that the |
There is one thing that only now came to my mind... |
I had also forgotten about this! I don't see it in any documentation and I doubt it's in broad use. It seems it would be easier to put instructions for downloading the app as part of a label or hint. This doesn't change my thinking around how we specify the app to launch. Here's a summary of when I think it's valuable to use the
All of these have me continuing to feel like the solution here is a good one! If you all agree, let's get it to completion. @lindsay-stevens let's also work on getting some criteria like this around use of the |
I've linked the parameters comments to the existing ticket for that. I think parameters can be a useful shortcut when used sparingly, but they have major limitations in relation to parsing values (e.g. multiple or complex params) and specifying translations. |
@grzesiek2010 I think so? Is it tested in Collect, too?
"No activity found to handle: %s" and yes, it's translated.
Yes, agreed! |
I've added a test for that case.
No, in Collect we don't have end-to-end tests for |
In support of getodk/collect#5621
In the
parameters
column forimage
questions, introduce anapp
key for fields of typeimage
. The value of this key should be put in a body attribute with nameintent
.Example:
app=com.jeyluta.timestampcamerafree
This is very similar to the existing
intent
body attribute used to specify an external app that returns multiple values:pyxform/pyxform/section.py
Line 191 in 129abe9
The value is an Android application id. My understanding is that these must always use Java package name conventions so we could do some validation there, e.g. using regex. I'd like someone else to confirm that the structure is guaranteed as part of deciding whether not we validate.
The text was updated successfully, but these errors were encountered: