Greetings ODK Community,
As a former Android developer and current Technical Project Manager at a software company in Nepal, Naxa, specializing in extensive geo-data work, I wanted to share an exciting proposed solution to address a limitation in ODK Collect regarding custom map layers. I’ve created a basic implementation of the idea to make it clear how it might work and to demonstrate proof of concept.
What high-level problem are you trying to solve?
ODK Collect has proven to be a valuable tool for our field surveying activities. However, we encountered a specific challenge when it came to transferring offline map imagery layers; since recent versions of Android make it difficult to place files in application directories, the only practical method is using a USB cable and external PC. Not everyone has access to PCs or the knowledge and time required to transfer offline files via USB transfer, and even for those able to do so it’s a hassle in the field. Faulty or malfunctioning cables often disrupted our data collection process, causing unnecessary delays and frustration. Many users, including ourselves, are glad to have the ability to use offline imagery/basemaps but wish it were easier to get and provide them.
Additionally, during the ODK Summit, a desire for offline basemaps was expressed by many stakeholders. While we don’t expect this to be a comprehensive solution, we think it could be an incremental improvement that will already help a number of users.
Any ideas on how ODK could help you solve it?
Introducing a Proposed Solution
To address this issue, I have implemented a feature in ODK Collect that enables the direct download of map layers from a URL into the appropriate application directory. This feature allows users to bypass the need for a USB cable and transfer the map layers seamlessly. Project managers can provide basemap imagery layers to their users and instruct their enumerators to download those map layers. It doesn’t disrupt or change the workflow of anyone already using the app; it’s an extra option available only within the basemap section of the project settings dialogue, and would likely only be noticed by users already interested in basemaps.
I have made an APK available on GitHub so people can test it out a version of Collect with this feature (requires uninstallation of ODK Collect while testing). It can be accessed through the following link [https://github.com/konishon/collect/releases/tag/v2023.2-mbtiles.0]. If this is of interest to the ODK community, I’d be glad to submit this as a pull request and go through the necessary reviews and process to integrate this into ODK Collect for everyone.
Using the Solution
To utilize this feature, follow the steps outlined below:
- Open your project in ODK Collect.
- Go to the project settings.
- Click to the maps list item.
- In the URL text input, enter the URL of your .mbtiles file.
- Wait for the file to download.
- Select your desired layer from the "Layer data file" option.
- Use this layer in your form.
Known Issues in the Current Solution
While the current solution addresses the USB cable limitation, there are a few known issues that should be taken into consideration:
- Accessibility of .mbtiles: The .mbtiles file you are trying to download should be publicly accessible on the internet.
- File Extension: The downloaded file should have the .mbtiles extension.
- Overwriting Files: If a file with the same name is downloaded, it will replace the original file.
- No support Big files download: Right now the download only work reliability for small files (less than 100MB)
Future Plans
In the future, I plan to enhance and improve this solution further. Some potential areas for improvement include:
- Adding the option to include an MBTiles file in the QR code defining a project, as well as settings to determine if the file is automatically downloaded when the project is loaded into the phone (with the usual precautions such as asking for user permission and/or waiting for wifi before downloading in case of a low-bandwidth connection).
- Refining the UX/UI.
- Adding support to an authenticated file download
- Enhancing the error handling and validation processes to provide better user feedback.
I am open to feedback and suggestions regarding the need for such a feature in the ODK app.
Upload any helpful links, sketches, and videos.