◆ addApiListener()
Add a listener for only api general callback - used by the mapviewers
- Parameters
-
| listener | to add if not already there |
◆ addInitListener()
Add a listener for initialization related events
- Parameters
-
| listener | to add if not already there |
◆ addLicenseListener()
Add a listener for licence info
- Parameters
-
| listener | to add if not already there |
◆ checkAndAddSlash()
| static String checkAndAddSlash |
( |
String |
str | ) |
|
|
staticprotected |
helper function for correct ending of API paths
◆ checkApiFolders()
| boolean checkApiFolders |
( |
| ) |
|
|
protected |
Check if api folders are set and exists If API folders are not set, the method returns false If Api folders do not exist, it throws a Runtime exception
◆ doApiInit()
do the concreate initialization call for the SDK here
- Returns
- errocode of init process
Reimplemented in ApiHelper.
◆ general()
Is called for multiple purposes.
- Parameters
-
| callbackType | - See GeneralCallbackType |
| optionalText | - Content depends on the callbackType |
| optionalNumber | - Content depends on the callbackType |
- Returns
- The handling of the returned value depends on the callbackType
Implements ApiListener.
◆ getApplicationPath()
| final String getApplicationPath |
( |
| ) |
|
◆ getAppVersion()
| final String getAppVersion |
( |
| ) |
|
◆ getDeviceId() [1/2]
| final String getDeviceId |
( |
| ) |
|
Get the device id for this device Only works if ApiHelper isInitialized or getDeviceId(Context context) has been called
- Returns
- the device id String - empty if ApiHelper.isInitialized == true
◆ getDeviceId() [2/2]
| final String getDeviceId |
( |
Context |
context | ) |
|
Get the device id and store it for further calls - even if ApiHelper is not initiailized yet, but requires a context
- Returns
- the unique device id
◆ getDisplayInfo()
- Returns
- information object of the current display
◆ getIMEI()
Get the device id for this device Only works if ApiHelper isInitialized or getDeviceId(Context context) has been called
- Returns
- the device id String - empty if ApiHelper.isInitialized == true
◆ getLicense()
Requests Server for a license - if granted api is reinitialized, otherwise apiInit error is received
◆ getLocationManager()
- Returns
- locationmanager to control the GPS functions
◆ getMapDataPath()
| final String getMapDataPath |
( |
| ) |
|
◆ getPackageName()
| final String getPackageName |
( |
| ) |
|
◆ getResourcePath()
| final String getResourcePath |
( |
| ) |
|
◆ getSensorManager()
| IwSensorManager getSensorManager |
( |
| ) |
|
- Returns
- sensormanager for orientation updates
◆ getSoundPath()
- Returns
- sound path to speech files
◆ getTempPath()
| final String getTempPath |
( |
| ) |
|
◆ getUserDataPath()
| final String getUserDataPath |
( |
| ) |
|
◆ initPaths() [1/3]
| void initPaths |
( |
String |
apiDirPath | ) |
|
helper function to set the paths for the API, must be called before Initialization
- Parameters
-
| apiDirPath | - absolute path to main application directory, this has to contain the folders/files: data, res, user, temp, mapservices.xml |
◆ initPaths() [2/3]
| void initPaths |
( |
String |
apiDirPath, |
|
|
String |
dataPath |
|
) |
| |
helper function to set the paths for the API, must be called before Initialization
- Parameters
-
| apiDirPath | - absolute path to main application directory, this has to contain the folders/files: data, res, user, temp, mapservices.xml |
| dataPath | - absolute path to overlay data as well as shape data for viewing and routing of iw-mapdata. |
◆ initPaths() [3/3]
| void initPaths |
( |
String |
appPath, |
|
|
String |
dataPath, |
|
|
String |
resourcePath, |
|
|
String |
osUserDataPath, |
|
|
String |
tempPath, |
|
|
String |
mapservicexml |
|
) |
| |
the paths for the API, must be called before initialization
- Parameters
-
| appPath | - absolute path to main application directory |
| dataPath | - absolute path to overlay data as well as shape data for viewing and routing of iw-mapdata. |
| resourcePath | - absolute path to display resolution information for example as fonts, language dependent information, sound files (wav) and poi icons. The language directories (one for each language) contain poi-category files, string tables for menu, button and message strings, sound files for announcements and a TMC event list. |
| osUserDataPath | - absolute path to user data directory, inside this directory the settings, favorites and history files are stored |
| tempPath | - absolute path to temp directory, inside this directory temporary files will be stored |
| mapservicexml | - absolute path to mapservices.xml file delivered by infoware (read only) |
◆ isApiInitialized()
| final boolean isApiInitialized |
( |
| ) |
|
◆ isApiThreadAlive()
| boolean isApiThreadAlive |
( |
| ) |
|
- Returns
- true if api thread is alive
◆ isCurrentThreadApiThread()
| boolean isCurrentThreadApiThread |
( |
| ) |
|
- Returns
- true if this method is executed on API Thread
◆ licenceChanged()
Called if changes in the list of licenced features occurs
Implements LicenceListener.
◆ licenceIsInvalid()
Called if the licence is invalid
- Parameters
-
| error | - errorcode describing whay the licence is invalid |
Implements LicenceListener.
◆ mapContent()
| void mapContent |
( |
Iterable< MapContent > |
mapContentList | ) |
|
Retrieves a list of all possible map types
Implements ApiListener.
◆ onApiInitFinished()
| void onApiInitFinished |
( |
ApiError |
retVal, |
|
|
String |
description |
|
) |
| |
extract result and redirect to apiListener
◆ queueApiCall() [1/2]
| boolean queueApiCall |
( |
ApiTask |
task | ) |
|
execute task on APIThread
- Parameters
-
- Returns
- true if api thread running and task enqueued
◆ queueApiCall() [2/2]
| boolean queueApiCall |
( |
Runnable |
task | ) |
|
execute task on APIThread
- Parameters
-
- Returns
- true if api thread running and task enqueued
◆ queueApiCallHighPriority() [1/2]
| boolean queueApiCallHighPriority |
( |
ApiTask |
task | ) |
|
execute task on APIThread with low priority. This will be exuted if no other default priority Task are enqueued.
- Parameters
-
- Returns
- true if api thread running and task enqueued
◆ queueApiCallHighPriority() [2/2]
| boolean queueApiCallHighPriority |
( |
Runnable |
task | ) |
|
execute task on APIThread with high priority
- Parameters
-
- Returns
- true if api thread running and task enqueued
◆ queueApiCallLowPriority() [1/2]
| boolean queueApiCallLowPriority |
( |
ApiTask |
task | ) |
|
execute task on APIThread with low priority. This will be exuted if no other default priority Task are enqueued.
- Parameters
-
- Returns
- true if api thread running and task enqueued
◆ queueApiCallLowPriority() [2/2]
| boolean queueApiCallLowPriority |
( |
Runnable |
task | ) |
|
execute task on APIThread with low priority
- Parameters
-
- Returns
- true if api thread running and task enqueued
◆ removeApiListener()
remove a listener for only api general callback - used by the mapviewers
- Parameters
-
◆ removeInitListener()
remove a listener for api related events like init / uninit
Only needed for IwMapView, app registers this listener with initialization
- Parameters
-
◆ removeLicenseListener()
remove a listener for licence info
- Parameters
-
◆ setApiInitialized()
| void setApiInitialized |
( |
boolean |
isInitialized | ) |
|
|
protected |
◆ setLocationManager()
Stop current location manager and use the new one
- Parameters
-
| newLocationManager | - new locationmanager to set |
◆ setSensorManager()
| void setSensorManager |
( |
IwSensorManager |
newSensorManager | ) |
|
Stop current sensor manager and use the new one
- Parameters
-
| newSensorManager | - new snsormanager to use |
◆ setSoundPath()
| void setSoundPath |
( |
String |
path | ) |
|
sets the path to the speech files, from inside the API, don't call from application
- Parameters
-
◆ startApiThread()
start the thread that runs the API
◆ stopApiThread()
Stop the ApiThread and null its instance
◆ storeContextInfosForNativeAPI()
| void storeContextInfosForNativeAPI |
( |
Context |
context | ) |
|
|
protected |
◆ uninitialize() [1/2]
Unloads the library from memory. Please call this method ONLY before ending the applications, otherwise this may lead to exceptions.
Do not call subsequently uninitialize and initialize! This may lead to unpredictive behavior.
- Attention
- After uninitialization, ALL references to SDK objects e.g. mapviewer, 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.
◆ uninitialize() [2/2]
| synchronized void uninitialize |
( |
final boolean |
reinit | ) |
|
|
protected |
if API thread running, we can uninit
Noify listener
◆ uninitLocationAndSensorManager()
| void uninitLocationAndSensorManager |
( |
| ) |
|
|
protected |
Stop location updates and deactivate manangers
◆ apiAppPath
◆ apiDataPath
◆ apiListenerList
Register as API Listener and redirect callbacks to multiple clients
◆ apiMapservicexml
◆ apiOsUserDataPath
◆ apiResourcePath
◆ apiTempPath
◆ apiThread
| IwApiThread apiThread = null |
|
protected |
Api Thread. Started on API initialize call
◆ appVersion
◆ deviceId
Device infos for native API part
◆ imei
IMEI of device if available
◆ initListenerList
Register as API Init Listener and redirect callbacks to multile clients
◆ licenseListenerList
◆ listenerMutex
| Object listenerMutex = new Object() |
|
protected |
◆ locationManager
location and orientation updates
◆ packageName
◆ sensorManager
| IwSensorManager sensorManager |
|
protected |
The documentation for this class was generated from the following file: