MapTrip SDK Android Manual 9.8.8
Api Class Reference

This class handles the api lifecycle, configuration and error management
More...

Static Public Member Functions

static void addApiListener (ApiListener listener)
 
final static native ApiError deleteSettingsParam (String section, String key)
 
static final ApiError enableNetworkConnections (final boolean enable)
 
final static native String getApplicationParam (String key)
 
final static native ApiError getLastError ()
 
final static native String getLastErrorDescription ()
 
final static native boolean getPowerSavingMode ()
 
static final String getServerValue (final String name)
 
final static native String getSettingsParam (String section, String key, String defaultValue)
 
final static native String getSystemAttribute (SystemAttribute attrib)
 
static final boolean IsNetworkConnectionEnabled ()
 
static void removeAllApiListeners ()
 
static void removeApiListener (ApiListener listener)
 
static final ApiError sendFeedback (final FeedbackType type, final String xml)
 
static final void sensorData (final Sensor sensor, final double timestamp, final double d1, final double d2, final double d3, final double d4)
 
final static native ApiError setApplicationParam (String key, String value)
 
static final ApiError setPowerSavingMode (final boolean enable)
 
final static native ApiError setServerParams (String parameters)
 
final static native ApiError setServerValue (String name, String value)
 
final static native ApiError setSettingsParam (String section, String key, String value)
 
static final ApiError useMapData (final boolean use)
 

Detailed Description

It contains the elementary functions for initialization, uninitialization and configurations like server parameters. Further the class keeps a general error state and more detailed description of the last error.

Member Function Documentation

◆ addApiListener()

static void addApiListener ( ApiListener  listener)
static

◆ deleteSettingsParam()

final static native ApiError deleteSettingsParam ( String  section,
String  key 
)
static

Completely deletes a parameter from the settings. Forces the SDK to use default values instead.

Returns
Errorcode

◆ enableNetworkConnections()

static final ApiError enableNetworkConnections ( final boolean  enable)
static

Enables or disables network connections.

Parameters
enableif false, all network connections from the SDK are disabled
Returns
Errorcode

◆ getApplicationParam()

final static native String getApplicationParam ( String  key)
static

Parameters
keywhose value to retrieve
Returns
Application param for the given key

◆ getLastError()

final static native ApiError getLastError ( )
static

Returns
the errorcode of the last SDK call

◆ getLastErrorDescription()

final static native String getLastErrorDescription ( )
static

Returns
the description of the last error if one occurred

◆ getPowerSavingMode()

final static native boolean getPowerSavingMode ( )
static

Returns true, if power saving mode is enabled.

◆ getServerValue()

static final String getServerValue ( final String  name)
static

Returns
reads server config variables.

◆ getSettingsParam()

final static native String getSettingsParam ( String  section,
String  key,
String  defaultValue 
)
static

For internal use only.

Returns
Errorcode

◆ getSystemAttribute()

final static native String getSystemAttribute ( SystemAttribute  attrib)
static

Retrieve internal configuration information from the SDK

Parameters
attribsee values of SystemAttribute.
Returns
system Attribute for the given key

◆ IsNetworkConnectionEnabled()

static final boolean IsNetworkConnectionEnabled ( )
static

Checks if network connections are enabled or disabled.

◆ removeAllApiListeners()

static void removeAllApiListeners ( )
static

◆ removeApiListener()

static void removeApiListener ( ApiListener  listener)
static

◆ sendFeedback()

static final ApiError sendFeedback ( final FeedbackType  type,
final String  xml 
)
static

Function to send feedback or log files to infoware. The api starts an internal task and sends progress and finish information back by the general callback.

Parameters
type- MTA_FEEDBACK_TYPE Type of the feedback
xml- The feedback with multiple attributes...
Returns
Errorcode

◆ sensorData()

static final void sensorData ( final Sensor  sensor,
final double  timestamp,
final double  d1,
final double  d2,
final double  d3,
final double  d4 
)
static

◆ setApplicationParam()

final static native ApiError setApplicationParam ( String  key,
String  value 
)
static

Generic function to set arbitrary user defined application parameters that are persistently stored over the application runtime. Parameters are defined by using key-value pairs and stored in the settings.ini file under the [APPLICATION] tag. The values are restricted to a length of 255 characters. Longer keys will be cut at the 255 character and a String terminator is appended.

Parameters
key- to add
value- to assign
Returns
Errorcode

◆ setPowerSavingMode()

static final ApiError setPowerSavingMode ( final boolean  enable)
static

Enables or disables the power saving mode.

Parameters
enableif true, all API timers are stopped, if false, all API timers are resumed
Returns
Errorcode

◆ setServerParams()

final static native ApiError setServerParams ( String  parameters)
static

Parameters
parametersadditional parameters for all server requests. The params are attached as suffix to all requests.
Returns
Errorcode

◆ setServerValue()

final static native ApiError setServerValue ( String  name,
String  value 
)
static

Initializes server config variables resp. URL parameters.

Parameters
name- param name to set
value- param value to set
Returns
Errorcode

◆ setSettingsParam()

final static native ApiError setSettingsParam ( String  section,
String  key,
String  value 
)
static

For internal use only.

Returns
Errorcode

◆ useMapData()

static final ApiError useMapData ( final boolean  use)
static

Activates or deactivates the usage of the map data. This is useful, if you like to exchange the map data during runtime. If the usage is deactivated, a current route guidance will be stopped and all Objects - except the MapViewers - will be deleted.

Attention
If the usage is deactivated, a current route guidance will be stopped and ALL references to SDK objects - except the MapViewers - e.g. navigation, itineraries, waypoints or iterator are invalid! Calling methods on these object will result in the errorcode ApiError.INVALID_OBJECT Also if the SDK is re-initialized all existing object references will return ApiError.INVALID_OBJECT on called member methods. Please re-initialize all static variables and class members.
Parameters
useIf true, the usage of the map data will be activated again. If false, the SDK stops using the map data. Then it is possible to exchange the map files.
Returns
Errorcode

The documentation for this class was generated from the following file: