navit-project.org
http://forum.navit-project.org/

Android: bookmark vs map location
http://forum.navit-project.org/viewtopic.php?f=17&t=564
Page 1 of 1

Author:  tauso [ 17 May 2015, 16:14 ]
Post subject:  Android: bookmark vs map location

Hello,

currently I have a little problem with navit (svn 6093) on my Android Device Sony Z1c:
The device has internal storage and an additional sdcard.
The internal sorage is mounted at /storage/emulated/0 and i think symlinked to /sdcard1, /mnt/sdcard and /storage/sdcard0.
The sdcard is mounted at /storage/sdcard1 and symlinked to /sdcard1

It seems navits default location of bookmarks, xml and so on is /mnt/sdcard (internal storage). With this setting everything looks ok.
When I set the map location to the sdacrd at /storage/sdcard1 or /sdcard1, the map from this folder is loaded, but it is impossible to save any bookmark.

Can somebody reproduce this behaviour and is there a workaround anyhow?

Edit: Sorry for posting in the wrnog section, maybe somebody can move this post to support.

Author:  tauso [ 27 Oct 2015, 11:06 ]
Post subject:  Re: Android: bookmark vs map location

Problem is still there in the new version (from Play Store). Can somebody give me a hint?
Maybe it's also related to viewtopic.php?f=11&t=577

Author:  tryagain [ 28 Oct 2015, 20:39 ]
Post subject:  Re: Android: bookmark vs map location

Hi!
Are you sure you're unable to save the bookmarks? Or rather to restore them? We store bookmarks in the map folder in bookmark.txt file. So if you switch map folder, to keep your bookmarks you have no choice besides to move bookmark.txt by some file manager.

BTW, that place seems to be not a very good choice. They used to be held in system assigned private navit folder, which is probably more intuitive.

Author:  tauso [ 08 Nov 2015, 09:50 ]
Post subject:  Re: Android: bookmark vs map location

tryagain wrote:
Are you sure you're unable to save the bookmarks? Or rather to restore them?


Yes. It's also impossible to download a mapfile there. The download doesn't even start it stays at 0 of x kbytes.
But navit reads the bookmark, navit.xml and binfiles there, if I copied them manually there.

Looks like, navit can read but cannot write in this location.
Other apps (like here maps) can store there data in that folder.

Author:  tryagain [ 08 Nov 2015, 20:52 ]
Post subject:  Re: Android: bookmark vs map location

tauso wrote:
Looks like, navit can read but cannot write in this location.
Other apps (like here maps) can store there data in that folder.

Oh. It looks like there are another two API changes we have not worried about.

First one makes it impossible for any third party application to write to external sd card on unrooted Android 4.4 outside of a special application dir (/Android/data/org.navitproject.navit relative to sdcard root). Official documentation confirms it. We could suggest users of Android 4.4. device to select app specific directory and we should warn them that this information could be deleted (altogether with downloaded maps, bookmarks, and even configuration backups!) on app removal. Directories of the path /Android/data/org.navitproject.navit should be created by the system automatically, but sometimes that's not the case and then user would have to create them manually (on PC?).

Another one allows to overcome aforementioned limitation on Android 5.0 (and above) devices with ACTION_OPEN_DOCUMENT_TREE intent.

Also, we should notify user if map directory is not writable.

Concluding, we have some work for devs, but there seems to be a workaround: select /Android/data/org.navitproject.navit dir for map storage.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/