![]() |
MapTrip Interface Android Reference Manual 9.10.1
|
Static Public Member Functions | |
| final static native int | enableLogging (String fileName, int logLevel, int fileSizeInBytes, int fileCount, boolean closeFileMode, boolean debugLogging) |
| final static native int | init () |
| final static native int | uninit () |
| final static native int | findServer () |
| final static native int | showApp (String packageName, String activity) |
| final static native int | sendText (String text) |
| final static native int | getMapVersion () |
| final static native int | getApiVersion () |
| final static native int | getMaptripVersion () |
| final static native int | setSettingsParameter (String section, String parameter, String value) |
| final static native int | getSettingsParameter (String section, String parameter) |
| final static native int | showServer () |
| final static native int | hideServer () |
| final static native int | stopServer () |
| final static native int | enableNetworkConnections (boolean enable) |
| final static native int | setDataUsageMonthlyLimit (int KBytes) |
| final static native int | resetDataUsageMonthlyLimit () |
| final static native int | getDataUsageMonthlyLimit () |
| final static native int | getDataUsageRemainingQuota () |
| final static native int | isNetworkConnectionEnabled () |
| final static native int | addBlockagePoint (double xCoord, double yCoord, double radius, boolean persistent, String ID, long startTime, long endTime) |
| final static native int | addBlockagePath (List< Double > Coordinates, boolean persistent, String ID, long startTime, long endTime) |
| final static native int | addBlockagePolygon (List< Double > Coordinates, boolean persistent, String ID, long startTime, long endTime) |
| final static native int | addBlockageOfRoutePart (double meters, boolean persistent, String ID, long startTime, long endTime) |
| final static native int | getBlockageCount (boolean persistent) |
| final static native int | getBlockageAt (int blockNumber, boolean persistent) |
| final static native int | deleteAllBlockages (boolean persistent) |
| final static native int | deleteBlockageAt (int blockNumber, boolean persistent) |
| final static native int | deleteBlockageByID (String ID, boolean persistent) |
| final static native int | customFunction (String param1, String param2) |
| static void | addListener (ApiListener listener) |
| static void | removeListener (ApiListener listener) |
| static void | removeAllListeners () |
|
static |
| meters | - Length of the route part to be blocked in meters |
| persistent | - True: Blockage is stored persistently in MapTrip. False: Blockage is removed when MapTrip is closed |
| ID | - Unique identifier of the blockage |
| startTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage starts |
| endTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage ends |
|
static |
Adds a blockage The coordinates can be in WGS (longitute, latitude) or in mercator projection.
| Coordinates | - Array of coordinates [x1,y1, x2,y2, ..., xN,yN] |
| coordCount | - Number of points in the Coordinates array |
| persistent | - True: Blockage is stored persistently in MapTrip. False: Blockage is removed when MapTrip is closed |
| ID | - Unique identifier of the blockage |
| startTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage starts |
| endTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage ends |
|
static |
Adds a blockage The coordinates can be in WGS (longitute, latitude) or in mercator projection.
| xCoord | - x coordinate of the point |
| yCoord | - y coordinate of the point |
| radius | - In meters around the point which is blocked |
| persistent | - True: Blockage is stored persistently in MapTrip. False: Blockage is removed when MapTrip is closed |
| ID | - Unique identifier of the blockage |
| startTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage starts |
| endTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage ends |
|
static |
Adds a blockage The coordinates can be in WGS (longitute, latitude) or in mercator projection.
| Coordinates | - Array of coordinates [x1,y1, x2,y2, ..., xN,yN] |
| coordCount | - Number of points in the Coordinates array |
| persistent | - True: Blockage is stored persistently in MapTrip. False: Blockage is removed when MapTrip is closed |
| ID | - Unique identifier of the blockage |
| startTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage starts |
| endTime | - Unix time stamp in seconds (since 01.01.1970) when the blockage ends |
|
static |
|
static |
Calls a custom function in MapTrip with two string parameters.
| param1 | - first parameter |
| param2 | - second parameter |
|
static |
| persistent | - True: Delete only persistent blockages. False: Delete only non-persistent blockages |
|
static |
| persistent | - True: Delete only persistent blockages. False: Delete only non-persistent blockages |
|
static |
Deletes blockage at the given index
| blockNumber | - Index of the blockage (0 .. blockage count -1) |
| persistent | - True: Delete only persistent blockages. False: Delete only non-persistent blockages |
|
static |
Activates debug logging. A logfiles will be written in the path of the application execution.
| fileName | - name of the log file |
| logLevel | - Log all messages up to the given level ( 1 logs only critical errors, 999 logs everything ) |
| fileSizeInBytes | - Max size of the log file |
| fileCount | - Max count of logfiles. If fileCount is reached, logging continues at the first file |
| closeFileMode | - if true, every log entry will open and close the logfile so that no log is skipped (e.g. exception in application) |
| debugLogging | - if true, the debug console will be used as log oputput instead of a file |
|
static |
Enables or disables network connections.
| enable | if false, all network connections from the SDK are disabled |
|
static |
This function can be used to ask if the server is still running.
|
static |
Get the version of the current api used by the server.
|
static |
Gets blockage information at the given index
| blockNumber | - Index of the blockage (0 .. blockage count -1) |
| persistent | - True: Get only persistent blockages. False: Get only non-persistent blockages |
|
static |
| persistent | - True: Count only persistent blockages. False: Count only non-persistent blockages |
|
static |
Get monthly network data limit.
|
static |
Get remaining quota before reaching the monthly network data limit.
|
static |
Get the version of the running maptrip instance.
|
static |
Get the version of the used map data. Format: "(maprelease) mapProvider".
|
static |
Requests a parameter in the MapTrip settings.ini. You receive the value of the requested parameter in the callback ApiListener.getSettingsParameter().
| section | - section of the parameter |
| parameter | - parameter to request |
|
static |
This function can be used to request the Server application to minimize
|
static |
Initializes communication with the server. This should be the first call if you want to use the interface. The ApiListener.initResult() will be called as soon as the mti interface is initialized. For a successful initialization the server application has to run.
To receive an event if MapTrip has started or quit, register the ApiListener.infoMsg(). This can be done even before initialization.
A typical initialization scenario would cover the following steps:
|
static |
Checks, if network connections are enabled or disabled.
|
static |
|
static |
|
static |
Reset monthly network data limit.
|
static |
Sends a text to the server application which is displayed on the mapview. Text formatting can be done in the MapTrip configuration files (For adjustments modify the MainWindow.xml StatusTextControl for the desired resolution). To hide the text, send an empty string as text.
| text | - Text that is printed on the map. Pass an empty string to hide a displayed text |
|
static |
Set monthly network data limit.
| monthly | data limit in KB. Zero or negative value to disable limit. |
|
static |
Sets a parameter in the MapTrip settings.ini.
| section | - section of the parameter to be changed |
| parameter | - parameter to be changed |
| value | - value for the parameter |
|
static |
|
static |
This function can be used to request the Server application to maximize or minimize.
|
static |
Requests the server application to shut down.
|
static |
Closes the communication channel to maptrip and frees internal resources used by the MTI.dll.
After a call to Api.uninit() no further infoMsg can be received. Re-register the callback to receive the Info.MAPTRIP_STARTED events again.
Blocking call