Difference between revisions of "Android"

From Navit's Wiki
Jump to: navigation, search
(List of Android devices which Navit is (confirmed) running on: SGSII)
(Re-configure)
Line 1: Line 1:
=== Install from Android Market ===
+
[[Image:Andoidscreenshot_001.png|150px|thumb|First run of Navit]]
Use the QR code below, or click through to https://market.android.com/details?id=org.navitproject.navit
+
Navit is available on Android! Using the [[Internal_Gui|Internal GUI]], Navit enables complete offline routing anywhere in the world using map data from [[OpenStreetMap|OpenStreetMaps]].
  
[[Image:Andoid.png]]
+
==Installation==
 +
[[Image:Andoid.png|250px|thumb|QR code: scan this to get Navit from the Android Market]]
 +
Most users use one of two routes to get Navit onto their Android devices: [https://market.android.com/details?id=org.navitproject.navit|install from the '''Market'''], or manually install from '''apk's''' built nightly from the latest source code.
  
=== Screenshots ===
+
Installing from the Android Market is perhaps the most simple, and allows for automatic updating. Manually installing from an apk means that you have the very latest updates built into Navit, but requires you to install it yourself.
[[File:Andoidscreenshot_001.png|150px]]
 
[[File:Andoidscreenshot_002.png|150px]]
 
[[File:Andoidscreenshot_003.png|150px]]
 
  
=== Nightly development versions ===
+
The following table links through to the nightly apk's. Choose the one which best matches your device.
The following table links through to the latest bleeding-edge versions of Navit, built nightly. These versions may not be stable - if you are a first time user we recommend obtaining the more stable version from the [[#Install from Android Market|market]]. Since Navit is a native application, different versions are available for different processor types. Choose the one which best matches your device.
 
  
 
{|style="border-style:solid;border-width:1px;border-color:#aaa;background: #f9f9f9;border-collapse: collapse;font-size: 95%;" border="1" cellpadding="4"
 
{|style="border-style:solid;border-width:1px;border-color:#aaa;background: #f9f9f9;border-collapse: collapse;font-size: 95%;" border="1" cellpadding="4"
 
|-
 
|-
! Download dir
+
!  
 
! Compatible devices
 
! Compatible devices
 
|-
 
|-
| [http://download.navit-project.org/navit/android/svn/ ARM v5] || ARMv5TE processors, should be compatible with most Android devices, including HTC Desire Z, Motorola Defy/Droid/Milestone, Samsung I7500 Galaxy, Samsung I9100 Galaxy S2, Samsung Galaxy Spica i5700, Samsung Galaxy S, SE Xperia X10, Xperia X8, LG Optimus Speed (P990)
+
| [http://download.navit-project.org/navit/android/svn/ ARM v5] || ARMv5TE processors, covers most Android devices including: HTC Desire Z, Motorola Defy/Droid/Milestone, Samsung I7500 Galaxy, Samsung Galaxy S2, Samsung Galaxy Spica i5700, Samsung Galaxy S, SE Xperia X10, Xperia X8, LG Optimus Speed (P990)
 
|-
 
|-
 
| [http://download.navit-project.org/navit/android_armv4t/svn/ ARM v4] || ARMv4 processors, only found in unofficial ports. This version should also work on other Android phones but the ARMv5 version is recommended. Devices which require this version include Neo Freerunner (running Android).
 
| [http://download.navit-project.org/navit/android_armv4t/svn/ ARM v4] || ARMv4 processors, only found in unofficial ports. This version should also work on other Android phones but the ARMv5 version is recommended. Devices which require this version include Neo Freerunner (running Android).
 
|}
 
|}
  
=== List of Android devices which Navit is (confirmed) running on ===
 
  
 +
=== Compatible Android devices ===
 +
The following tables list Android devices on which Navit has been tested. Please consider editing the table for your own device.
 
{|style="border-style:solid;border-width:1px;border-color:#aaa;background: #f9f9f9;border-collapse: collapse;font-size: 95%;" border="1" cellpadding="4" class="wikitable sortable"
 
{|style="border-style:solid;border-width:1px;border-color:#aaa;background: #f9f9f9;border-collapse: collapse;font-size: 95%;" border="1" cellpadding="4" class="wikitable sortable"
 
|-
 
|-
Line 102: Line 101:
 
|}
 
|}
  
===Setup and Configuration===
+
==Useful information==
 +
[[Image:Andoidscreenshot_003.png|150px|thumb|In-app map downloading]]
 +
===Maps===
 +
There are two ways to get a map into Navit.
 +
# Press your device's Menu button, and choose ''Download first map''. Maps will be greater than 50MB, so it's best to turn on your wifi.
 +
# Download a map from [http://maps.navit-project.org/download/ the Navit Map Extractor], and save it as ''navitmap.bin'' into ''/sdcard/navit/'' on your device.
  
First get the latest apk for your phone (see above) and install it onto your device.
+
===Advanced configuration===
 
+
When Navit starts, a copy of <tt>/data/data/org.navitproject.navit/share/navit.xml</tt> matching your display resolution is extracted from the apk. If you have root permissions on your device, you can use this file as a starting point for a customized configuration. Otherwise unzip the apk file and use the xml file from the subdirectory <tt>res/raw/</tt> which matches the display resolution (ldpi, mdpi or hdpi).
==== Automatic map download [recommended] ====
+
You can save your configuration as <tt>/sdcard/navit/navit.xml</tt> which is then used instead of the one from the data directory.
* Start Navit and choose "download map" from the menu. Download the desired map (you may wish to turn on your wifi because those maps can be large downloads).
 
 
 
==== Manual map download [less recommended] ====
 
* Get a map from [http://maps.navit-project.org/download/ Navit map extractor] and save it as '''/sdcard/navit/navitmap.bin'''.
 
 
 
==== Troubleshooting ====
 
If you are using the Android Market version, send crash reports via your android phone.
 
 
 
If you can't update try to uninstall it first. Note that you will lose your bookmarks and all settings.
 
 
 
If Navit doesn't work please include the output of "adb logcat" (via the sdk) or "logcat" (via terminal on the device) in your [http://trac.navit-project.org/ bug report].
 
 
 
==== navit.xml ====
 
When Navit starts, a copy of <tt>/data/data/org.navitproject.navit/share/navit.xml</tt> matching your display resolution is extracted from the apk. If you have root permissions on your device, you can use this file as a starting point for a customized configuration, otherwise unzip the apk file and use the xml file from the subdirectory <tt>res/raw/</tt> which matches the display resolution (ldpi, mdpi or hdpi).
 
You can save your configuration as <tt>/sdcard/navit/navit.xml</tt> (the legacy location <tt>/sdcard/navit.xml</tt> still works) which is then used instead of the one from the data directory. Use at your own risk, it might be incompatible with future releases.
 
  
 
* If you'd like to configure the initial view of the map (it should automatically center on your position if the on-board GPS has a fix) change the '''<navit center=...''' attribute to your home coordinates.
 
* If you'd like to configure the initial view of the map (it should automatically center on your position if the on-board GPS has a fix) change the '''<navit center=...''' attribute to your home coordinates.
Line 127: Line 116:
 
* See [[Configuring Navit]] for additional settings.
 
* See [[Configuring Navit]] for additional settings.
  
==== Launch navit via google apps ====
+
=== Launch via Google ===
 
+
When you click on a place in Google Maps, you can choose to navigate to it with Navit (assuming that there isn't already a default navigation app set).
When you click on a place in google maps, you can choose to navigate to it with Navit.
 
(except if you have set the default navigation application already to something else)
 
 
 
==== Parse error ====
 
 
 
when you get a parse error while you tried to launch navit, that means that a certain type of search isn't implemented. currently only search that contains lat/lon info can be parsed.
 
  
==== Bookmarks file ====
+
=== Bookmarks file ===
At this present time, the bookmarks.txt file can be found in the following location:
+
The ''bookmarks.txt'' file can be found in the following location:
 
  /data/data/org.navit-project.navit/home/bookmark.txt
 
  /data/data/org.navit-project.navit/home/bookmark.txt
  
 
You will need root access on your device to be able to access this file.
 
You will need root access on your device to be able to access this file.
  
=== Compiling it yourself [Easy Method] ===
+
==Developing for Android==
 
+
=== Compiling ===
* download vmware image (it also runs fine with virtualbox)
+
The following instructions may provide varying degrees of success:
        image file:          [http://frink.nuigalway.ie/~zoff/navit_vm/navit_ub_20110302.rar navit_ub_20110302.rar]
 
        file size:            1.9 GB (rar archive)
 
        MD5 checksum:        14553194ca524c54a8ba88a482042342
 
        environment config:  Ubuntu 10.4,android SDK 10,android NDK 5b,ant 1.8
 
 
 
* if you need to install vmware use the: [http://downloads.vmware.com/d/info/desktop_end_user_computing/vmware_player/4_0 VMware Player]
 
 
 
* extract all files from the rar archive
 
 
 
* start the VMware Player and load the vmx-file (the following login information seems not to be necessery anymore)
 
        username: navit
 
        password: navit
 
 
 
* open an xterminal and start these scripts to generate navit for android
 
        ./A01_update_navit_svn.sh
 
        ./A02_make.sh
 
        ./A03_make_apk.sh
 
        # repeat those 3 commands, when you change some code
 
 
 
* start these commands to test the created package in the android emulator
 
        ./B09_start_emu_1.6.sh
 
        ./B11_test_navit_in_emu.sh
 
 
 
=== Compiling it yourself [Manual Method] ===
 
Note that manually compiling for Android is not straightforward, and if bandwidth allows it is strongly suggested that the [[Navit_on_Android#Compiling_it_yourself_.5BEasy_Method.5D |Easy Method]] is tried first. The following instructions may provide varying degrees of success:
 
 
* Install the prerequisite libraries see [[Dependencies]]. You need the Android NDK and SDK.
 
* Install the prerequisite libraries see [[Dependencies]]. You need the Android NDK and SDK.
 
* Extend PATH with $NDK/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin:$SDK/tools where $NDK and $SDK refers to the development kits.
 
* Extend PATH with $NDK/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin:$SDK/tools where $NDK and $SDK refers to the development kits.

Revision as of 20:29, 1 March 2012

First run of Navit

Navit is available on Android! Using the Internal GUI, Navit enables complete offline routing anywhere in the world using map data from OpenStreetMaps.

Installation

QR code: scan this to get Navit from the Android Market

Most users use one of two routes to get Navit onto their Android devices: from the Market, or manually install from apk's built nightly from the latest source code.

Installing from the Android Market is perhaps the most simple, and allows for automatic updating. Manually installing from an apk means that you have the very latest updates built into Navit, but requires you to install it yourself.

The following table links through to the nightly apk's. Choose the one which best matches your device.

Compatible devices
ARM v5 ARMv5TE processors, covers most Android devices including: HTC Desire Z, Motorola Defy/Droid/Milestone, Samsung I7500 Galaxy, Samsung Galaxy S2, Samsung Galaxy Spica i5700, Samsung Galaxy S, SE Xperia X10, Xperia X8, LG Optimus Speed (P990)
ARM v4 ARMv4 processors, only found in unofficial ports. This version should also work on other Android phones but the ARMv5 version is recommended. Devices which require this version include Neo Freerunner (running Android).


Compatible Android devices

The following tables list Android devices on which Navit has been tested. Please consider editing the table for your own device.

Device Status Tested on SVN revision
Archos 5 IT running fine 4383, 4395, 4411
Acer ICONIA TAB A500 running fine; after suspend GPS must be disabled and enabled again (market)
Geeksphone One with RCMod 4.0.0 (Gingerbread) Exits on startup (following crash of PicoTTS) unless speech output is disabled, runs fine otherwise 4319
Geeksphone Zero with RCMod 7.0.2 (Gingerbread) running fine (market)
Google/Samsung Galaxy Nexus I9250 running fine 4785 (market), 4909
Google/Samsung Nexus S running fine after brief test (market)
Huawei Ideos X3 (U8510) speech synthesis often incomplete 4696
Huawei M860 running fine 4281
HTC Desire running fine 42xx-48xx, 4904-4945
HTC Desire HD (Ace) running fine (market)
HTC Desire S running fine 4281 (market)
HTC Desire Z running fine 4281 (market), 4785 (market), 4808
HTC Incredible S running fine 4281 (market)
HTC Hero (Android 2.2, cronos) running fine (saving bookmaks made it unusable) 4118
HTC Sensation (Android 4.0.3) running fine 4785 (market)
HTC Wildfire (Android 2.2) running fine (saving theme does not work) 4495
LG Optimus GT540 running fine 4118, 4281 (Google market)
LG Optimus P500 One running fine current market build, 4383, 4446
Motorola Defy running fine 4281 (market), 4352, 4383
Motorola Milestone 2 running fine (market)
Motorola Xoom (Android 3.2) running fine (market) → 0.5.0
Neo Freerunner (AoF Cupcake 0.2.0) cannot install, adb install returns [INSTALL_FAILED_OLDER_SDK]. Is Cupcake no longer supported? 4376
Neo Freerunner (AoF-SD Froyo) runs fine; GPS must be started manually 4548
Neo Freerunner (AoF-SD Froyo) starts, icon in left upper corner, application stops 4833
Samsung GT-I5500 (Android 2.1 update1) running fine 0.5.0-3828
Samsung Galaxy Gio GT-S5660 (Android 2.2.1 Froyo) running fine svn 4663
Samsung Galaxy Gio GT-S5660 (Android 2.2.3) running fine svn 4785
Samsung Galaxy S I9000 running fine svn 4183, 4229, 4510 - market 0.5.0-4281
Samsung Galaxy S2 I9100 running fine 4940
Samsung Galaxy Spica I5700 with Samdroid mod running fine 4083
Samsung Galaxy Tab P1000 running fine 4183
Xiaomi One Plus MIUI 2.3.5k running fine; GPS to start manually 0.5.0 4929
Xperia X8 running fine 0.5.0.4281
Xperia X10 running fine  ??
ZTE Blade / Orange San Francisco running fine 4155

Useful information

In-app map downloading

Maps

There are two ways to get a map into Navit.

  1. Press your device's Menu button, and choose Download first map. Maps will be greater than 50MB, so it's best to turn on your wifi.
  2. Download a map from the Navit Map Extractor, and save it as navitmap.bin into /sdcard/navit/ on your device.

Advanced configuration

When Navit starts, a copy of /data/data/org.navitproject.navit/share/navit.xml matching your display resolution is extracted from the apk. If you have root permissions on your device, you can use this file as a starting point for a customized configuration. Otherwise unzip the apk file and use the xml file from the subdirectory res/raw/ which matches the display resolution (ldpi, mdpi or hdpi). You can save your configuration as /sdcard/navit/navit.xml which is then used instead of the one from the data directory.

  • If you'd like to configure the initial view of the map (it should automatically center on your position if the on-board GPS has a fix) change the <navit center=... attribute to your home coordinates.

Launch via Google

When you click on a place in Google Maps, you can choose to navigate to it with Navit (assuming that there isn't already a default navigation app set).

Bookmarks file

The bookmarks.txt file can be found in the following location:

/data/data/org.navit-project.navit/home/bookmark.txt

You will need root access on your device to be able to access this file.

Developing for Android

Compiling

The following instructions may provide varying degrees of success:

With autotools

  • Run ./autogen.sh from the navit dir.
  • Make sure you have
    • $ANDROID_NDK pointing to your ndk installation
    • $ANDROID_API_LVL set to 4
    • $ANDROID_NDK/toolchains/arm-eabi-*/prebuilt/linux-x86/bin in your $PATH
    • $ANDROID_PLATFORM set to $ANDROID_NDK/platforms/android-$ANDROID_API_LVL/arch-arm
  • Run something like
./configure \
PKG_CONFIG=arm-eabi-pkgconfig \
RANLIB=arm-eabi-ranlib \
AR=arm-eabi-ar \
CC="arm-eabi-gcc -L$ANDROID_PLATFORM/usr/lib -L. -I$ANDROID_PLATFORM/usr/include" \
CXX=arm-eabi-g++ \
--host=arm-eabi-linux_android \
--enable-avoid-float \
--enable-avoid-unaligned \
--enable-cache-size=20971520 \
--enable-svg2png-scaling=8,16,32,48,64,96 \
--enable-svg2png-scaling-nav=59 \
--enable-svg2png-scaling-flag=32 \
--with-xslts=android,plugin_menu,pedestrian_button,pedestrian \
--with-saxon=saxonb-xslt \
--enable-transformation-roll \
--enable-plugin-pedestrian \
--with-android-permissions=CAMERA \
--with-android-project="android-$ANDROID_API_LVL"
  • Run make
  • cd navit
  • Run make apkg

The result is in android/bin as Navit-debug.apk

Even easier is it to use this hopefully foolproof build script. Since r4507, it is part of navit. From the navit-main-directory, call it with ./contrib/android_build.sh. Good luck!

With cmake

  • install CMake 2.8 if you haven't already
  • create a build dir (i.e. "mkdir android-build")
  • run to set navit source path or exchange $SOURCE_PATH with the navit source path in following examples
 export SOURCE_PATH=<navit source path>
  • run from build dir:
 cmake -DCMAKE_TOOLCHAIN_FILE=$SOURCE_PATH/Toolchain/arm-eabi.cmake -DCACHE_SIZE="(20*1024*1024)" -DAVOID_FLOAT=1 -DANDROID_PERMISSIONS="CAMERA" $SOURCE_PATH
  • run make
  • run make apkg
  • install Navit-debug.apk (in <build path>/navit/android/bin) to your device
    • copy navit/android/bin/Navit-debug.apk to your device (i.e. sd-card) and run it from there or
    • if debug bridge (adb) is enabled run adb install navit/android/bin/Navit-debug.apk

With cmake on Windows

  • install CMake 2.8 if you haven't already, add folder with exe to PATH
  • install MinGW or use MinGW included in the git windows folder (e.g. C:\msysgit\mingw\), add folder with exe to PATH
  • install saxon .NET version from http://sourceforge.net/projects/saxon/files/Saxon-HE/9.3/SaxonHE9-3-0-4N-setup.exe/download,
  • rename transform.exe to saxon.exe, add folder with exe to PATH
  • create a build dir (i.e. "mkdir android-build")
  • run from build dir ( replace $SOURCE_PATH):
 cmake -DCMAKE_TOOLCHAIN_FILE=$SOURCE_PATH/Toolchain/arm-eabi.cmake -DCACHE_SIZE="(20*1024*1024)" -DAVOID_FLOAT=1 -DANDROID_PERMISSIONS="CAMERA" $SOURCE_PATH -G "MinGW Makefiles"
  • run MinGW32-make
  • run MinGW32-make apkg
  • install Navit-debug.apk (in <build path>/navit/android/bin) to your device
    • copy navit/android/bin/Navit-debug.apk to your device (i.e. sd-card) and run it from there or
    • if debug bridge (adb) is enabled run adb install navit/android/bin/Navit-debug.apk