Skip to content

Use Case: Remote App Question Type

BobEvans edited this page Nov 21, 2014 · 1 revision

Spring from Issue 955 https://github.com/google/paco/issues/955, here is a detailed explanation of the feature.

To enable calling out to another app to retrieve data as part of responding to an experiment. This is exactly like the current photo chooser behavior except generalized. Where the photo input type launches one specific intent, the Camera App, waiting for one specific data type, the url of a photo stored on disk, this question type will allow specification of an intent to launch (on Android, not sure about iOS, maybe the callback-uri mechanism?) and it will receive back a json string containing a key-value tuple that it will insert into the dataset for the experiment as it would for any other question response.

Questions: Right now, there is no way for an input to provide multiple key-value pairs. Is this necessary for this feature.

Size limit, in order not to cause unintended breakage, there should be an upper limit on the data accepted in callback to Paco. Right now, other than photos, which are stored outside the datastore, there is usually a 500 char limit on inputs. Is this sufficient?

Should we have an option to specify a key to look for in the returned json data? Some apps may return multiple responses but perhaps only one is relevant to the experiment.

Should there be a protocol for an error response? For example, the app does not exist on the phone, in which case the intent call will fail. Should we disable the question or fill in a response of "app not installed"?

Another example of error protocol, if the called app cannot complete the data entry, do we expect an empty response from the app, or, a error string to present to the user?

Clone this wiki locally