diff --git a/brouter-routing-app/assets/readmes.zip b/brouter-routing-app/assets/readmes.zip new file mode 100644 index 0000000..56b7998 Binary files /dev/null and b/brouter-routing-app/assets/readmes.zip differ diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java b/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java index aa4c652..3729815 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java @@ -152,6 +152,7 @@ public class BRouterView extends View assertDirectoryExists( "profile directory", profileDir, "profiles2.zip" ); modesDir = basedir + "/brouter/modes"; assertDirectoryExists( "modes directory", modesDir, "modes.zip" ); + assertDirectoryExists( "readmes directory", basedir + "/brouter/readmes", "readmes.zip" ); cor = CoordinateReader.obtainValidReader( basedir, segmentDir ); wpList = cor.waypoints; diff --git a/misc/readmes/kitkat_survival_readme.txt b/misc/readmes/kitkat_survival_readme.txt new file mode 100644 index 0000000..5f34111 --- /dev/null +++ b/misc/readmes/kitkat_survival_readme.txt @@ -0,0 +1,64 @@ +Surviving with Android 4.4 (KitKat) using BRouter 1.0.1 +======================================================= + +BRouter 1.0.1 adds some basic support to reclaim your external +SD card on KitKat. + +What's new is a configuration file located at: + + brouter/segments3/storageconfig.txt + +which has 2 configuration items: + + "secondary_segment_dir" points to an additional directory containing + routing data files. This can be located anywhere. + + "additional_maptool_dir" points to a base-directory that should + be scanned for maptool-installations in addition to the standard-guesses. + +Initially, the value for "secondary_segment_dir" is "../segments2" to support the +file-format transition from 0.9.9 to 1.0.1, so that, after upgrading, your existing +datafiles are found via the secondary directory. + +However, for surviving KitKat, you are supposed to change that to the +absolute path to a directory on the external card, e.g.: + +secondary_segment_dir=/storage/external_SD/brouter_segments3 + +When searching for datafiles, both the download manager and the router first look in the primary (brouter/segments3) and then in the secondary directory (or it's "carsubset" subfolder). On the other hand, the download manager always writes new datafiles to the primary directory, so the secondary directory is read-only. + +So you can move datafiles downloaded by the download-manager to the secondary directory, by using a file manager, in order to free disk space on the internal card. Or you ca download datafiles directly to the secondary directory by doing manual http downloads +from http://brouter.de/brouter/segments3 + +Depending on how your maptool handles the file-system structure, you are done. + +However, e.g. for OsmAnd it is likely that BRouter still has no access to OsmAnd's waypoint database. The reason is: + +When, after installing OsmAnd, you choose to move it's resources to the external SD Card, +it moves it to a special directory where it has write-access even with Android 4.4, e.g.: + + /storage/external_SD/Android/data/net.osmand/files + +The package name slightly differs for OsmAnd+. + +This directory is not found automatically by BRouter, so you have to configure +it as "additional_maptool_dir". + +However, you are still not done, because if BRouter finds a wayoint-database file +under: + + /storage/external_SD/Android/data/net.osmand/files/osmand/favourites.gpx + +then it decides to write it's tracks to: + + /storage/external_SD/Android/data/net.osmand/files/osmand/tracks + +But this directory is not writable by BRouter. So what you have to do is to create +a redirection-file (create the tracks folder if it does not exist!) + + /storage/external_SD/Android/data/net.osmand/files/osmand/tracks/brouter.redirect + +and that should contain a single line with the absolute path to the folder where +the tracks should be written (e.g. /mnt/sdcard/brouter ) + +THEN you are done. diff --git a/misc/readmes/profile_developers_guide.txt b/misc/readmes/profile_developers_guide.txt index 8caab4f..9168357 100644 --- a/misc/readmes/profile_developers_guide.txt +++ b/misc/readmes/profile_developers_guide.txt @@ -95,6 +95,8 @@ the routing engine: The operators of the profile scripts ------------------------------------ +The profile scripts use polnic notation (=operator first) + The "assign" operator is special: it can be used only on the top level of the expression hirarchy and has 2 operands: diff --git a/misc/readmes/readme.txt b/misc/readmes/readme.txt index be88572..7c34010 100644 --- a/misc/readmes/readme.txt +++ b/misc/readmes/readme.txt @@ -1,4 +1,4 @@ -BRouter - Beta Version 0.9.9 - Setting up the Android App +BRouter - Version 1.0.1 - Setting up the Android App ========================================================= Choosing and Installing a Map-Tool @@ -40,21 +40,13 @@ Installing the BRouter App -------------------------- You can install the BRouter-App either from Google's Play Store -or directly from the APK-File contained within the "brouter_0_9_9.zip" +or directly from the APK-File contained within the "brouter_1_0_1.zip" distribution zip-file. -Both APKs are not identical: While the Google-Play-Version contains -a download manager and asks for internet access, the APK from the -distribution zip is the "pure offline" version and does not contain -the download manager. The download manager assists downloading the -required routing data files. If you are using the pure-offline version, -it's on you to download these files manually. Or you can start with -the Google-Play version and later on install the pure offline APK, -replacing the other one, thus disabling internet access (Un-Installing -BRouter does not delete anything on the sd-card). - -The pure-offline APK asks for permissions to access the SD-Card -and to de-activate the screen saver, but not for internet access. +Both APKs are identical. There used to be a pure-offline version +in the distribution-zip, but with version 1.0.1 this APK also does +include the download manager, so it asks for internet access. +Pure offline support will be restored in the next version. Choosing a SD-Card Base Directory @@ -74,6 +66,15 @@ Navigation needs big data files that usually should go on an external, big sd-card. You should accept the external card, which is usually the one with the most space available. +However, on Android 4.4, write access to the external card +is restricted, and usually you will not get a proposal to use +the external card. Here you should accespt to go with the +internal card - later on you can setup a "secondary" data +directory on the external card where you can move the datafiles +to. + +*** see the kitkat_survival_readme.txt for special Android 4.4 issues *** + Try to make sure your map-tool uses the same base directory to store the offline maps and other stuff, because BRouter tries to access the maptool's waypoint-database and tracks-directory, @@ -92,6 +93,15 @@ The first line of that redirection file called "brouter.redirect" must contain the absolute path of the directory where you want the gpx-files to go (e.g. /storage0/oruxmaps/tracklogs). +If you have a non-standard maptool location, that is not +detected by the default logic, you can configure an "additional maptool directory" +in a configuration file located unter brouter/segments3/storageconfig.txt +This is neccessary e.g. if you operate OsmAnd on the external SD card +under Android 4.4. Then this uses a special base directory to obey +Android 4.4's access restrictions, and this base directory is not found +by the default logic. See the kitkat_survival_readme.txt for details. + + Completing your installation ---------------------------- @@ -101,8 +111,8 @@ relative to this base directory, so you end up with e.g. the following structure (depending on base dir and your map-tool choice): /mnt/sdcard/brouter -/mnt/sdcard/brouter/segments2 <- ** put routing data files (*.rd5) here ** -/mnt/sdcard/brouter/segments2/carsubset <- ** put *.cd5 files here ** +/mnt/sdcard/brouter/segments3 <- ** put routing data files (*.rd5) here ** +/mnt/sdcard/brouter/segments3/carsubset <- ** put *.cd5 files here ** /mnt/sdcard/brouter/profiles2 <- lookup-table and routing profiles /mnt/sdcard/brouter/modes <- routing-mode/profile mapping @@ -117,15 +127,16 @@ relative to this base directory, so you end up with e.g. the following structure The "profiles2" and the "modes" directory get some reasonable default-configuration -from the installation procedure, but the "segments2" directory is still empty, so -you have to get routing-datafiles in order to complete your installation. +from the installation procedure, but the "segments3" directory is basically empty +(except for the storageconfig.txt file) so you have to get routing-datafiles in +order to complete your installation. -If using the Google-Play version, the download manager starts automatically to -help you with this download. If using the pure offline APK, you can download +After accepting the base directory, the download manager starts automatically to +help you with this download. Or you can download them manually from the following locations: - http://h2096617.stratoserver.net/brouter/segments2 - http://h2096617.stratoserver.net/brouter/segments2/carsubset + http://brouter.de/brouter/segments3 + http://brouter.de/brouter/segments3/carsubset Routing data files are organised as 5*5 degree files, with the Filename containing the south-west corner @@ -136,12 +147,12 @@ of the square, which means: From the above link you find routing data for all places in the world where OSM data is available. The carsubset datafiles are needed only if you want to -calculate car-routes ovefr lomg distances, otherwise you are fine with just the +calculate car-routes over long distances, otherwise you are fine with just the normal (full) rd5's. The minimum files BRouter needs to work are e.g. -/mnt/sdcard/brouter/segments2/E5_N45.rd5 +/mnt/sdcard/brouter/segments3/E5_N45.rd5 /mnt/sdcard/brouter/profiles2/lookups.dat /mnt/sdcard/brouter/profiles2/trekking.brf @@ -158,7 +169,7 @@ called by the map-tools very much like on online routing service. To do that, you have to choose BRouter as a navigation service in your map-tool. This is supported by OsmAnd, Locus-Maps and OruxMaps (In OsmAnd starting with version 1.7, -you see BRouter is a navigation service if BRouter is installed. You do not see the +you see BRouter as a navigation service if BRouter is installed. You do not see the option if BRouter is not installed). There's a mapping between the "routing-mode" asked for by the map-tool @@ -228,7 +239,7 @@ it effective in the service-interface as well, but initially, every nogo-area is effective in the service-interface. Nogo areas can be used either to account for real obstacles or to enforce -personel routing preferences. +personal routing preferences. Mixed operation: "timeout-free recalculations" @@ -240,11 +251,11 @@ the service interface as well, especially the dynamic recalculations if you get off the track, without running into the 60 seconds timeout. To support this, BRouter can do "timeout free recalculations". It works by -initially calculating a track to your destination nd binding it to one or -more routing-modes using the "Server Mode" button. This way, BROuter stores +initially calculating a track to your destination and binding it to one or +more routing-modes using the "Server Mode" button. This way, BRouter stores a "reference track" in the "brouter/modes" subdirectory. -If afterwards a route to the exact same destinatin is calculated via the service interface, +If afterwards a route to the exact same destination is calculated via the service interface, BRouter uses a special calculation mode that makes use of the reference track for faster processing that is guaranteed to give a result within 60 seconds. "Exact same" destination means withing 5m, so best use the same waypoint for