Question about making a link from the commcare app inside our phone… to another program:
Very normal: I have an ecascade app that collects lots of variables in a form.
Let’s imagine that a scientist in my company did some research on my data, and he made a machine learning algorithm that was able to make a cool, valuable prediction based on just 6 variables. And imagine, in a form in my commcare app, I do have the 6 numbers that are needed for that prediction… they are sitting nicely in hidden variables.
That scientist is able to make a program in R language… and that program would simply take the 6 variables and generate output of the prediction that results. [Note: No, it is not possible to express the relationship as a simple formula… It has to be a full R program.]
What if my normal Commcare form, running in a phone, does actually have those 6 separate values. Could the form running on the phone create some kind of link / automatic call / API call to EITHER another app (either an android app on the very same phone, OR a web app that’s available on the net)? Is that hard to do?
ACTUALLY I am thinking just as I am writing this, and I am realizing one possible way to do that could be:
- The R application could be running on a web app,
- That web app URL could be set up with a query string with 6 parameters… so that the 6 variables could be sent to the program right in the URL, similar to this: www.myapp.org/?a=124&b=6&c=100&d=98&e=0&f=12
- If you don’t’ see red flags with the above, then the viability of this method would come down to a simple question: If I use string commands in the commcare form to assemble that complete URL correctly, then can I make a question in a commcare form that will display, in a label item in the commcare app, a clickable link that takes the user to that exact URL, and if clicked, it will launch the web browser in that phone and navigate there?