Layer data file - Background MBTiles

Hello, I created MBTiles using QGIS and have loaded them onto my phone (SDcard/Android/data/org.odk.collect.android/files/layers)
but KoboCollect can’t locate them and comes up with this message when I attempt to reference them in General Settings/Maps
"There are no layer files in… "
Can anyone assist?

Regards

1 Like

Have you tried this with ODK Collect android app? Does it work with ODK Collect android app?

Doesn’t work with ODK Collect also

Try configuring your Collect android app as follows and you should be able to view the MBTILES File as layers while collecting data with Collect android app.

Step 1: Copying MBTILES File to your device.

Copy your desired MBTILES File to SDcard/Android/data/org.koboc.collect.android/files/layers if you are using KoBoCollect android app or to SDcard/Android/data/org.odk.collect.android/files/layers if you are using ODK Collect android app depending upon the Collect android app you are using. Note: you could also change the the SDcard to Internal storage depending upon the storage your device uses.

Step 2: Configuring the settings in Collect android app.

  • Open Collect android app
  • Select General Settings
  • Select Maps
  • Change Source to Mapbox and then also change Layer data file from None to the recently added file that you should see something like /sdcard/Android/data/org.koboc.collect.android/files/layers/xxxxx.mbtiles if you are using KoBoCollect android app or to /sdcard/Android/data/org.odk.collect.android/files/layers/xxxxx.mbtiles if you are using ODK Collect android app. Note: xxxxx.mbtiles is the file that you copied to your device.

Doing so, you should be able to use the layer file while collecting gps data.

Thank you.

I didn’t realise there was a similar ‘Layer’ folder in Internal storage. I was using the one in the SDcard. When I saved the files to the internal folder it worked. This is despite the Reference setting saying “SDcard/…”
How do I now change Collect to look for the MBTiles in the SDcard and not on the internal storage? (As there is usually more space there)

Regards

1 Like

Does your SDcard have the following path:

SDcard/Android/data/org.koboc.collect.android/files/layers

i.e. … /Android/data/org.koboc.collect.android/files/layers

If yes, it should work.

The path is the same although is shows as “SD card” not SDcard. But it still doesn’t recognize the MBTiles I put there.

Also, the “/layers” folder on the sdcard was not created automatically. I had to create myself. However, the “/layers” folder in the internal storage was automatically created when I installed Collect.

Regards

Hello @Kal_Lam, I was wondering if it is possible to add these files as “Media” on kobocollect as we do with CSV upload for pulldata function.

1 Like

@paani as it is a map file it should be kept in the said map directory.

Hi,
How do you create the MBTiles on the QGIS i try plugin on the QGIS but does not work.
help please

Hi @sara_7500

This would be beyond the scope of what the community would be able to cover. However, by just searching the same parameters online, you can find the some resources such as this.

Regards,
Stephane

1 Like

I have a fresh install of Android 11 and ODK Collect v2021.2. After reading a bit on the forums it seems Android 11 does not allow me to copy my mbtiles layer to the sdcard/android/data directory. When I go there to paste (“copy here”) my mbtiles file, the screen (within the My files app) says “No files”. When I try to create the directory org.odk.collect.android, the name is already in use. Help?

Welcome to the community, @rmthomas! It could be the issue with the location of your folder.

Thanks @Kal_Lam :slight_smile: I agree. The problem seems to be that I dont have read/write access to the folder the ODK Collect searches for my mbtiles layer. Can I change the locations ODK Collect searches for mbtiles layers? If not, is there documentation specific to Android 11?

@rmthomas, would you mind giving a try with another device?

Thanks for ths suggestion. I only have the one android phone. Is Kobotoolbox not supporting this issue or never heard of it? I assumed this would have come up because I am a noobie.