-
Notifications
You must be signed in to change notification settings - Fork 38
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
constraint.json Files as ODK Media Files #156
Comments
This sounds like a pretty straightforward thing that could be implemented. I think the initial idea is that custom constraints would be a part of a deployment. When you download MBTiles and OSM files as a part of a deployment, the custom constraint file would come with it. When you're getting your deployment with all that you need, that too would include your constraint.json. But, looking in the forms media directory in ODK sounds reasonable to me. |
Add code for copying over a form's constraints from its ODK media directory into OMK's constraints directory. Fix for issue posm#156 Signed-off-by: Jason Rogena <jasonrogena@gmail.com>
Add tests for code that fixes issue posm#156 (copying over constraints.json from ODK) Signed-off-by: Jason Rogena <jasonrogena@gmail.com>
Add tests for code that fixes issue posm#156 (copying over constraints.json from ODK) Signed-off-by: Jason Rogena <jasonrogena@gmail.com>
Add code for copying over a form's constraints from its ODK media directory into OMK's constraints directory. OMK now checks whether a file named omk-constraints.json exists inside the form's media directory Fix for issue posm#156 Signed-off-by: Jason Rogena <jasonrogena@gmail.com>
Add tests for code that fixes issue posm#156 (copying over constraints.json from ODK) Signed-off-by: Jason Rogena <jasonrogena@gmail.com>
Add logic for fetching the constraints and settings files from the ODK media directory for the ODK form in question Fix for issue posm#156 in github.com/americanredcross/openmapkitandroid Signed-off-by: Jason Rogena <jasonrogena@gmail.com>
Merged PR. |
Right now, the form specific configuration files placed in /sdcard/openmapkit/constraints/ have to be manually placed there. It might be a good idea to add functionality for fetching this configuration file from ODK's media directory. This will help in setups where we don't have the luxury of placing this file in all the devices (for instance, in cases where a lot of devices are being used).
I suggest a feature where if OpenMapKit is launched from ODK Collect, for instance, for a form named 'form 1', OMK checks whether a file named 'omk-constraints.json' exists in /sdcard/odk/forms/form 1-media/ and copies this file to /sdcard/openmapkit/constraints/ as 'form 1.json'. This will allow for guys to publish their OMK form specific constraints file alonside the ODK form on ODK Aggregate/Formhub/ona.io
The text was updated successfully, but these errors were encountered: