1

I've been trying(for days now) to get an Android map app working. This app has to work offline and im only interested in displaying a small city, after seeing all of my choices and trying them all, it seems that Nutiteq is a great choice, specifically the offline MBTiles option. After setting everything up, and using a .mbtiles file downloaded using TileMill, i get the following error:

No such table android_metadata

The .mbtile file i downloaded doesn't have this table, and i can't find which class made this query(if anyone can explain why it's needed great!!!); i tried updating my .mbtile file with Navicat to add this table with the desired locale column with the en_US value, and now it gives the following log error message:

can't upgrade read-only database from version 0 to 1

My questions are:

  • Is there a way to bypass this whole android_metadata query? I mean, if it's not included on the .mbtile why is it needed afterwards?
  • If you don't recommend bypassing it, how to fix my second error with the upgraded database?

Thanks.

maxandonuts
  • 595
  • 7
  • 19
  • 1
    Try using "SQLiteDatabase.NO_LOCALIZED_COLLATORS" flag when calling SQLiteDatabase.openDatabase() to avoid the android_metadata warning. – Gaurav Arora Sep 30 '13 at 12:42
  • Can you give specific code snippet how do you open the file (add a layer)? – JaakL Sep 30 '13 at 14:38
  • The opening is handled by SQLiteOpenHelper getReadableDatabase() method, which is troublesome because there is no clear call to the openDatabase() method on which i can use the flag suggested. Is that flag applyable elsewhere? – maxandonuts Oct 01 '13 at 20:56
  • What is your device exactly? It is strange error. Nutiteq should not require android_metadata in mbtiles files, and it has worked for me with plain mbtiles databases (without android_metadata) on all the devices where I've tested it. – JaakL Oct 03 '13 at 05:53
  • http://stackoverflow.com/a/21253885/2106820 – Arfan Mirza Jan 21 '14 at 09:24

1 Answers1

1

Are you trying to modify the database during the upgrade? If it's readonly, you probably can't modify it. You could create a new one, though, and copy the data from the old to the new.

Peri Hartman
  • 19,314
  • 18
  • 55
  • 101
  • Actually, i got it yesterday but redoing the whole code, i still haven't worked out the last one with that error, but i'll give it a go as soon as i can, thanks for your answer – maxandonuts Oct 01 '13 at 20:58