captureImage from custom ODK Tables pages?

1. What is the problem? Be very detailed.

I’m building a custom ODK-X Tables app, in which the data collection and updating is all done via custom HTML pages and associated javascript. I’ve found the “Reference Applications” a really helpful tool in this so thanks for that.

However, I’m currently stuck on trying to make a custom page capture an image. Referring to odkSurvey.js I can see that it eventually results in a call to odkCommon.doAction, passing org.opendatakit.survey.activities.MediaCaptureImageActivity as the action and a few other bits. I’ve recreated this in my app, but according to the debugger, the execution never gets as far as odkCommonIf.doAction.

2. What app or server are you using and on what device and operating system? Include version numbers.

  • LG V30 phone
  • ODK Tables 2.1.1 rev 228
  • Debugging via USB cable as normal and Chrome
  • Windows 10 latest

3. What you have you tried to fix the problem?

Various values into the odkCommon.doAction function based on what I’ve seen in odkSurvey, hunting around on GitHub for anyone else using these functions, etc.

4. What steps can we take to reproduce the problem?

Without building a whole app, I suppose running odkCommon.doAction() with a dispatch struct, and the action “org.opendatakit.survey.activities.MediaCaptureImageActivity” should do something?

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Thanks for any help, I’m pretty stumped on this one.