AvNav-Android

AvNav Android

After having the AvNav web GUI for the Raspberry Pi  already in place for some years, there is now also a genuine android version. It requires android 4.4 (KitKat) or later.

The latest version is available at downloads. Alternatively in the  Play Store.
You can find previous versions or daily builds via the  installation instructions.

Basically the app is packaging the WebApp (see User documentation) into an android app. For Charts check the hints at creating/converting charts.

Functions

(new since 20210424)

Internally the app consists of a couple of functional entities.

The NMEA multiplexer handles NMEA0183 data from various sources. Beside the internal GPS data can be read from sources like TCP connections, UDP ports, USB devices, Bluetooth... Most sources support sending and receiving of NMEA data at the same time. You can configure multiple sources of each type (within the app configuration there is a "handler" for each data source).

name within the app description
InternalGPS The location data from the internal GPS will be sent to the multiplexer as NMEA data.
TcpReader A TCP connection to an external system. AvNav acts as TCP client and will open up the connection.
You can either use a plain IP address or a hostname as destination (mdns names like avnav.local are supported).
TcpWriter AvNav listens for connections from other apps or systems and sends out the NMEA data from the multiplexer. AvNav acts as TCP server.
UdpReader AvNav receives UDP data at the configured port.
UdpWriter AvNav sends out UDP data to the configured address and port.
UsbConnection You can receive (and send) data via a connected USB serial converter device (requires USB OTG functionality of your Android device).
Bluetooth Connection to a bluetooth device. You need to pair the device (outside AvNav) before you can use it.
NMEA0183 service A connection to a system the provides its NMEA data as a TCP service via mdns (Bonjour/Avahi) - like e.g. SignalK.
AvNav establishes a TCP connection to this device.

You can configure the NMEA multiplexer in a very flexible manner. For each connection you can define input and output filters or blacklists.

Internally the multiplexer hands over its data to the other modules of the app. The decoder prepares the NMEA data for further usage inside the app.

The app itself with the chart display and the dashboards can be used as a normal android app. Additionally you can activate the integrated web server. This allows access to all app functions from a browsers on the same or a different device (similar to the AvNav server variant).

The display part of the app can be terminated while the multiplexer continues to run in background. So AvNav can act as a NMEA data provider for other navigation apps. You would configure a TcpWriter within AvNav and connect from the other app to localhost (127.0.0.1) and the configured port.

The app can use the device's internal GPS. Additionally you can receive NMEA data via TCP/IP, bluetooth or by an USB-serial adapter if your device supports USB OTG. As a sender for NMEA data you can e.g. use the raspberry version - or any other NMEA0183-wifi gateway. You can also use a plain bluetooth GPS mouse if your device does not have an internal GPS.

Charts and stored Data (Working Directory)

AvNav stores its data and charts in a working directory.

From the Android Settings you can choose the working directory (extended since 20250822).

Depending on the device you can select different locations where your data is stored (refer to the Android doc for some technical background). If your device has an SD card you will see a selection like above:

Name Explanation
Internal Storage This is a location in the internal flash memory of your device. It's completely private and (if your device is not rooted) is not accessible for other apps like a file manager.
This is the default. Its also available in versions before 20250822.
The "*" in front of the entry shows that this directory was already used as working directory and contains data.
External Storage This is a storage still being located in the internal flash memory but treated differently by the Android system (and therefore named "external - emulated"). Other apps can access this data location.
You can choose this location if you would like other apps (like a file manager) to access the data (and it is also available before 20250822). The path for a file manager would typically be [internal memory]/Android/data/de.wellenvogel.avnav.main/files (or [internal memory]/Android/data/de.wellenvogel.avnav.main.beta/files for a beta version)
External Storage-1 This will only be visible if your device has an SD card installed. Typically you will also see "removable [SD Card]" as explanation.
If available this directory really is located on an external SD card. If you plan to use this, just be sure to always have the SD card installed, when you run AvNav. If you remove it while AvNav is running it could crash.
Other apps like a file manger can access the data.
The location is [SD card]/Android/data/de.wellenvogel.avnav.main/files (or [SD card]/Android/data/de.wellenvogel.avnav.main.beta/files).
Not available before version 20250822.

When you change the WorkDir all your data in the old WorkDir will become invisible to AvNav (although they remain available and you can switch back to the old one at any time).

When AvNav starts up it checks if the selected working directory is still available (and will prompt you to choose a different one if not).

For the external directories you can in principle use a file manager to copy data to and from those locations but AvNav is not prepared to detect those data when it is running - so the preferred way  is to upload data to those locations directly within the app. But you could e.g. create a zip of the data as a backup.

All the WorkDir directories will be emptied if you deinstall AvNav (or clean it's data).

Important hint: Settings (i.e. configuration of the multiplexer and other android settings) are not stored in the WorkDir.

If you choose an "additonal chart directory" this is located outside of AvNav and you can keep charts in gemf or xml format there.  This directory can be created and accessed outside AvNav and it will not be touched when deinstalling AvNav or removing it's data.

Charts are expected to be available in gemf- Format. Since 20200325 you can also have "mbtiles" or "*.xml files".

Copy the charts either to the "additional charts dir" (gemf or xml only) or upload them in the app . Some demo charts are preinstalled - but they need an online connection.
To use o-charts (or S57 charts) you need to install avocharts and install your charts there.

To save data from AvNav or upload data you should have a file manager installed (normally already available on most devices).

Usage

After first start up you will see an introduction page:


After clicking ok you will see the main settings page.

Amongst other settings, you can select the working directory and the external charts directory.
A complete list of settings can be found here.
You can leave the settings page with the upper right button or by pressing the back button.
Each time you leave the settings page AvNav will check the permissions it expects and will ask you to allow them.
To work properly AvNav needs:
  • Access to fine location (GPS) as long as the app is running
  • Notifications to show you an info as long as AvNav is running (even when in background)
  • disabled battery optimization for AvNav

Additionally AvNav will check if (global) energy saving is enabled. If enabled AvNav will not be able to use the internal GPS while in background. So you will be asked to disable it.

Afterwards yo will get to the main page of the app (typically you will be prompted to accept the conditions before and to select one of the available layouts).


In the screenshot a valid internal position is shown (green bubble), but currently no AIS data (yellow bubble).
To return to the android setting move to the settings page within the app and click the android button there.
On further starts,  the app will directly present the main page.
For further usage description refer to the WebApp description.


External Access

(new since 20210424).

AvNav supports being accessed from other devices using a web browser. To provide this function you need to enable the WebServer in the settings of the app (Status/Server Page ).
You need to switch on "externalAccess" (only do this in trusted networks). With 'mdnsEnabled' a bonjour enabled app (like BonjourBrowser) can directly connect to the server.

In previous versions AvNav was using different modes for that.

  • Normal
  • External Browser
In normal mode the browser is integrated and it behaves like a standard android app.
In external browser mode the app starts up a web server at a user definable port (default 34567).


Background

The NMEA multiplexer (and the Web Server) of AvNav can run in background. You would e.g. use this if your display is on a different device.
To enter the background mode open the close dialog on the main page and select "BACKGROUND".
Via the android notification (in the Android notification bar) you can bring back the app to foreground - or close it completely.


Settings

The settings are split into two separate categories:

  • Specific Android settings
  • Settings for the multiplexer and other main parts

The android settings can be accessed via the button on the settings page or on the  server/status page.

Android Main Settings

Name Meaning Default
working directory you can select where the AvNav working directory should be located (internal storage or external storage) internal storage
additional charts directory external chart directory (not for mbtiles), SD card recommended ---
reset external chart dir reset the external chart directory (i.e. no external chart dir) ---
show demo charts demo charts (only with internet connected) on
Alarm sounds switch off alarm sounds. You may need to switch them off in your browser as well. on
Hide System Bars hide  the top and bottom android bars on
autoconnect USB devices When activated AvNav will be started whenever a supported USB device is plugged in and you will be asked to configure that device. When deactivated you still can configure USB devices using the + Button on the server/status page. on
allow unknown plugins AvNav has an interface (still experimental) that can be used by plugin to inform AvNav about functions that the plugin provides. Currently only charts are supported. With this switch activated a plugin that is not directly known to AvNav can still be used. Remark: avocharts is already known to AvNav and does not need this switch. on
reset to defaults reset the multiplexer and main settings to defaults

Android Sound Settings

Name Meaning Default
Sound for XXX alarm select the sounds for the alarms built in
reset to defaults reset all sound settings to defaults


Multiplexer Settings

(new since 20210424)

The multiplexer settings are available on the Status/Server Page . For each function (e.g. for each data source of the multiplexer) a so called 'handler' is available. You can check the status of the handlers and change their configuration.

New data sources (or targets) can be added using the button. A select dialog will provide all handlers that can be currently added (you will e.g. see an USBConnection only if there is an USB device actually connected).

Next to handlers in the status list a button permits to to edit the configuration of the handler.
Most of the parameters shown in the edit dialog have a  button providing a short help for the parameter. Using the button you can reset the particular parameter to it's default value.

Some of the parameters are common for multiple handlers:

Name Description default
enabled Activate/deactivate the handler. depends on handler
name Name of the handler. Can be used in black lists. empty
port TCP or UDP port
filter/readerFilter/ sendFilter A NMEA filter. You can define the NMEA sentences to pass. Multiple filters have to be separated by comma.
For records starting with a $ the next 2 characters will be ignored (the talker id). A filter for all $XXRMC records will look like:
$RMC
For AIS only (no other NMEA data):
!
All RMC and RMB records:
$RMC,$RMB
If you want to invert the filter, prefix the expression with ^.
^$RMB,^$APB
empty
blacklist A comma separated list of names. NMEA data from sources with those names will not be sent out. empty
queueAge AvNav internally uses a queue to transfer NMEA data from it's receivers (inputs) to it's senders (outputs). Whene an output is slow it potentially cannot send all data at the same speed as they arrive in the queue. If an item is sitting in the queue longer then this time (in ms) the item is droppped. 3000

The "Handlers" and their parameters:

Decoder

Parameter Description default
ownMMSI Own MMSI, will be suppressed in AIS displays empty
posAge Allowed age (in seconds) for the GPS position. After that time the position will be dropped if no new position has been received. 10
nmeaAge Allowed age (in seconds) for NMEA data (except position) 600
aisAge Allowed age for AIS Data 1200
readTimeout Timeout in seconds for the display whether valid data is available or not 10

Route

Parameter Beschreibung default
computeRMB if switched on RMB records will be created if the routing is active on
computeAPB if switched on APB records will be created if the routing is active on
useRhumbLine set the Routing Mode to rhumbLine off
nextWpMode set the mode for  next waypoint switching - late/early/90 late
nextWpTime for mode "early": Time (in sec) to wait after a waypoint alarm before switching to the next waypoint 10

Track

Parameter Beschreibung default
interval Interval in seconds for writing the track as gpx file. 300
distance Minimal distance between two trackpints in meters 25
minTime Minimal time in seconds before a new track point is written. 10
length Length of the shown track (in hours) 25

Logger

NMEA logger

WebServer

Parameter Description default
port The TCP Port the server is listening on 8080
external If active external devices can connect (otherwise: only local apps)
Hint: Be careful to only use this in a trusted network. There is no further protection against unauthorized access inside the app.
off
mdnsEnabled Announce the service via mnds (will allow Bonjour apps to find it) on
mdnsService The name you will see in mdns. avnav-android

InternalGPS

The internal GPS of the device.

MDNSResolver

The handler for resolving and announcing mdns names.

Remote Channel

The handler for using the Remote Control function.

TcpReader

Parameter Description default
ipAddress The ip address or the hostname of the server you want to connect to. This can also be a MDNS name like avnav.local . ---
port The Ip port you want to connect to. ---
sendOut If active NMEA data will be sent out (otherwise received only) on this connection. off
readTimeout Mark the connection as inactive if no NMEA data are received for this time (seconds). 10
writeTimeout Write timeout for one NMEA record (in seconds). Close and reopen the connection. Use 0 to disable writeTimeout. 5
connectTimeout Timeout for connecting (seconds, 0 - system-default). 0
closeOnTimeout Close (and reopen) the connection if no NMEA data has been received within readTimeout. on
stripLeading Strip any characters in a line before a ! or $ off

TcpWriter

A TCPWriter provides NMEA data for other apps.

Parameter Description default
port The IP port that the server will listen on ---
externalAccess If active other devices can connect. Otherwise only apps from the same device.
Hint: Be careful to only use this in a trusted network. There is no further protection against unauthorized access inside the app.
aus
writeTimeout Write timeout for a NMEA record (in seconds). Close and reopen the connection, choose 0 to disable writeTimeout. 5
readData If active also read data from an established connection (otherwise write only) off
stripLeading Strip any characters in a line before a ! or $ (only if readData is on) on
sendOwn Send out data that was received on the same connection (only visible if readData on).
Normally you should not enable this as you easily could create loops.
off
mdnsEnabled Announce this service via mdns (type: _nmea-0183._tcp) on
mdnsService The name of this service on mdns

UdpReader

An UDP Reader receives data from an UDP port.

Parameter Description default
port The UDP port the data will be received on. ---
externalAccess If active external devices can send data. Otherwise only apps from the same device.
Hint: Be careful to only use this in a trusted network. There is no further protection against unauthorized access inside the app.
off
readTimeout Show the connection to be inactive if no NMEA data have been received for this time (seconds). 10
stripLeading Strip any characters in a line before a ! or $ off

Important Hint: Due to limits in the Android system you cannot receive UDP messages being sent to a broadcast address when the device is in standby mode (screen off). You will still receive messages directly being sent to the device IP address. If you are going to use UDP senders with a broadcast address you have to ensure that the device remains active (will happen by default if AvNav is in foreground). You can use the Dim Button within AvNav to reduce the backlight and save energy this way. Refer to the GitHub issue #510.

UdpWriter

An UdpWriter will send out NMEA data via UDP to another app.

Parameter Description default
ipaddress The IP address or the hostname for the server you want to connect to. This can also be a MDNS name like avnav.local . ---
port The destination port ---
broadcast send the data as broadcast (requires the ipaddress to be a valid broadcast address) off

NMEA0183 Service

A NMEA0183 service mainly works like a TcpReader, without the need to define IP address and port of the origin. Instead you select the name of a MDNS service providing NMEA data from a list of detected services (type:  _nmea-0183._tcp). If there is e.g. a SignalK server or an AvNav server (> 20210415) in your network - they will announce their services this way (if configured to do so).

Advantage of using a service: it will continue to work if you change your network topology.

Parameter Description default
service The name of the service (select from a list of found services) ---
sendOut also send out NMEA data (otherwise read only) off
readTimeout Mark the connection as inactive if no NMEA data were received for this time (seconds). 10
writeTimeout Write timeout for a NMEA record (in seconds). Close and reopen the connection, choose 0 to disable writeTimeout. 5
connectTimeout Timeout for connecting (seconds, 0 - system-default). 0
closeOnTimeout Close (and reopen) the connection if no NMEA data were received within readTimeout. on

UsbConnection

AvNav will get activated when an USB device is connected (if you enabled this in the settings). Typically it makes sense to start AvNav first and afterwards connect the USB device. This way you can allow permanent access to the USB device for AvNav. AvNav will immediately start up the configuration dialog for the newly connected device.

Parameter Description default
device The USB device (more exact: the port it is connected to). Select from a list. ---
baud rate The serial baud rate. 9600
flowControl none|xon/xoff|rts/cts - flow control if supported by the adapter none
sendOut also send out NMEA data (otherwise read only) off
readTimeout Mark connection as inactive if no NMEA data were received for this time (seconds). 10

Bluetooth

Before you can use a bluetooth device you must pair it (outside of AvNav).
Parameter Description default
device The bluetooth device. When creating the handler you can select from a list of all paired devices. Only after saving the settings AvNav will actually try to connect to the device. ---
sendOut also send out NMEA data (otherwise read only) off
readTimeout Mark the connection as inactive if no NMEA data were received for this time (seconds). 10