Difference between revisions of "Android"

From Navit's Wiki
Jump to: navigation, search
m (With autotools =)
m (added Huawei M860 to list of tested phones)
Line 36: Line 36:
 
|-
 
|-
 
| Geeksphone One with RCMod 4.0.0 (Gingerbread) ||class="cell_maybe"| Exits on startup (following crash of PicoTTS) unless speech output is disabled, runs fine otherwise || 4319
 
| Geeksphone One with RCMod 4.0.0 (Gingerbread) ||class="cell_maybe"| Exits on startup (following crash of PicoTTS) unless speech output is disabled, runs fine otherwise || 4319
 +
|-
 +
| Huawei M860 || class="cell_yes"| running fine  || 4281
 
|-
 
|-
 
| HTC Desire || class="cell_yes"| running fine || 43xx, 44xx
 
| HTC Desire || class="cell_yes"| running fine || 43xx, 44xx

Revision as of 00:39, 30 May 2011

Install Navit from the Android Market (no root required) [recommended]

Andoid.png

Screenshots

Andoidscreenshot 001.png Andoidscreenshot 002.png Andoidscreenshot 003.png

Install nigthly development verions of Navit from the Website (no root required) [less recommended]

Since Navit is a native application, different versions are available for different processor types. Choose the one which best matches your device.

Download dir Compatible devices
android_armv5te ARMv5TE processors, should be compatible with most Android devices, including HTC Desire Z, Motorola Defy/Droid/Milestone, Samsung I7500 Galaxy, Samsung Galaxy Spica i5700, Samsung Galaxy S, SE Xperia X10, Xperia X8
android_armv4t 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).
android Link to ARMv5TE builds to denote what most Android devices use.


List of Android devices which Navit is (confirmed) running on

Device Status Tested on SVN revision
Archos 5 IT running fine 4383, 4395, 4411
Geeksphone One with RCMod 4.0.0 (Gingerbread) Exits on startup (following crash of PicoTTS) unless speech output is disabled, runs fine otherwise 4319
Huawei M860 running fine 4281
HTC Desire running fine 43xx, 44xx
HTC Desire HD (Ace) running fine (market)
HTC Desire S running fine 4281 (market)
HTC Desire Z running fine 4083, 4176, 4261, 4281, 4319
HTC Incredible S running fine 4281 (market)
HTC Hero (Android 2.2, cronos) running fine (saving bookmaks made it unusable) 4118
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)
Neo Freerunner (AoF Cupcake 0.2.0) cannot install, adb install returns [INSTALL_FAILED_OLDER_SDK]. Is Cupcake no longer supported? 4376
Samsung GT-I5500 (Android 2.1 update1) running fine 0.5.0-3828
Samsung Galaxy S running fine 4183, 4229
Samsung Galaxy Spica I5700 with Samdroid mod running fine 4083
Xperia X8 running fine  ??
Xperia X10 running fine  ??
ZTE Blade / Orange San Francisco running fine 4155

Setup and Configuration

First get the latest apk for your phone (see above) and install it onto your device.

Automatic map download [recommended]

  • 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]

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 bug report.

navit.xml

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 (the legacy location /sdcard/navit.xml 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.

Launch navit via google apps

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

At this present time, 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.

Compiling it yourself [Easy Method]

  • download vmware image (it also runs fine with virtualbox)
       image file:           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
  • start it up
       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 Easy Method is tried first. 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

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

Questions from users

2 questions on search function (hope this is the right place):

1) There are two kinds for address search (via menu-button of mobil phone and via software main menu). Is this a workaround or what is intended by this solution?

2) In Germany I could find nearly all addresses I searched for. For other countries there are even problems in finding big cities (Split in Croatia). Do you know the reason?

--Robart 12:41, 31 March 2011 (UTC)

Hi Robart!

I'll leave your first question to the Android devs. As for question number 2, have a look at OpenStreetMap#Problems_with_OSM_and_navit_or_navigation_in_general. In short, Navit only recognises places if it has an is_in tag attached to it. In the case of Split, I can't even see a place=* node - even Nominatim doesn't find an actual place called Split, just the railway station.... --Korrosa 13:31, 31 March 2011 (UTC)