Inheritance diagram for ApiHelper:Public Member Functions | |
| void | addApiListener (ApiListener listener) |
| void | addInitListener (ApiInitListener listener) |
| void | addLicenseListener (ApiLicenseListener listener) |
| int | general (GeneralCallbackType callbackType, String optionalText, double optionalNumber) |
| Iterable< DataSet > | getAllDataSets () |
| final String | getApplicationPath () |
| final String | getAppVersion () |
| final String | getDeviceId () |
| final String | getDeviceId (Context context) |
| DisplayInfo | getDisplayInfo () |
| final String | getIMEI () |
| ComputationSiteParameters | getInitParameters () |
| IwLocationManager | getLocationManager () |
| final String | getMapDataPath () |
| final String | getPackageName () |
| final String | getResourcePath () |
| IwSensorManager | getSensorManager () |
| String | getSoundPath () |
| final String | getTempPath () |
| final String | getUserDataPath () |
| ApiError | initialize (ComputationSiteParameters csParams, ApiInitListener listener) throws RuntimeException |
| ApiError | initialize (Context applicationContext, ComputationSiteParameters csParams, ApiInitListener listener) throws RuntimeException |
| void | initPaths (String apiDirPath) |
| void | initPaths (String apiDirPath, String dataPath) |
| void | initPaths (String appPath, String dataPath, String resourcePath, String osUserDataPath, String tempPath, String mapservicexml) |
| final boolean | isApiInitialized () |
| boolean | isApiThreadAlive () |
| boolean | isCurrentThreadApiThread () |
| boolean | isSensorDataUsageEnabled () |
| void | licenceChanged () |
| void | licenceIsInvalid (ApiError error) |
| void | mapContent (Iterable< MapContent > mapContentList) |
| void | onApiInitError (final ApiError err, final String description) |
| void | onApiInitFinished (ApiError retVal, String description) |
| void | onApiInitialized () |
| void | onApiUninitialized () |
| boolean | queueApiCall (ApiTask task) |
| boolean | queueApiCall (Runnable task) |
| boolean | queueApiCallHighPriority (ApiTask task) |
| boolean | queueApiCallHighPriority (Runnable task) |
| boolean | queueApiCallLowPriority (ApiTask task) |
| boolean | queueApiCallLowPriority (Runnable task) |
| void | removeApiListener (ApiListener listener) |
| void | removeInitListener (ApiInitListener listener) |
| void | removeLicenseListener (ApiLicenseListener listener) |
| void | setAllowResourceUpdate (boolean allowResourceUpdate) |
| void | setLocationManager (IwLocationManager newLocationManager) |
| void | setSensorDataUsageEnabled (boolean enable) |
| void | setSensorManager (IwSensorManager newSensorManager) |
| void | setSoundPath (String path) |
| void | uninitialize () |
Static Public Member Functions | |
| static ApiHelper | Instance () |
Protected Member Functions | |
| boolean | checkApiFolders () |
| ApiError | doApiInit () |
| void | getLicense () |
| void | initializeContext (Context context) |
| void | setApiInitialized (boolean isInitialized) |
| void | startApiThread () |
| void | stopApiThread () |
| void | storeContextInfosForNativeAPI (Context context) |
| synchronized void | uninitialize (final boolean reinit) |
| void | uninitLocationAndSensorManager () |
Static Protected Member Functions | |
| static String | checkAndAddSlash (String str) |
Protected Attributes | |
| String | apiAppPath |
| String | apiDataPath |
| List< ApiListener > | apiListenerList = new ArrayList<>() |
| String | apiMapservicexml |
| String | apiOsUserDataPath |
| String | apiResourcePath |
| String | apiTempPath |
| IwApiThread | apiThread = null |
| String | appVersion = "" |
| String | deviceId = "" |
| String | imei = "" |
| List< ApiInitListener > | initListenerList = new ArrayList<>() |
| List< ApiLicenseListener > | licenseListenerList = new ArrayList<>() |
| Object | listenerMutex = new Object() |
| IwLocationManager | locationManager |
| String | packageName = "" |
| IwSensorManager | sensorManager |
\ . has to be used to configure the SDK\'s resources paths and init / uninit the SDK
Singleton implementation
|
inherited |
Add a listener for only api general callback - used by the mapviewers
| listener | to add if not already there |
|
inherited |
Add a listener for initialization related events
| listener | to add if not already there |
|
inherited |
Add a listener for licence info
| listener | to add if not already there |
|
staticprotectedinherited |
helper function for correct ending of API paths
|
protectedinherited |
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
|
protected |
Call to init method with appropriate parameters
Reimplemented from ApiHelperCommon.
|
inherited |
Is called for multiple purposes.
| callbackType | - See GeneralCallbackType |
| optionalText | - Content depends on the callbackType |
| optionalNumber | - Content depends on the callbackType |
Implements ApiListener.
| Iterable< DataSet > getAllDataSets | ( | ) |
Retrieves an iterable collection of all DataSet objects configured for map data downloads.
This method provides access to all datasets from the current installation that are set up for remote updates. It ensures that a device ID for licensing is available before fetching the datasets.
Important: This method relies on a device identifier for licensing. The stability of this identifier can vary across different Android versions and may be affected by factory resets. Before calling this method, ensure that any necessary runtime permissions, such as Manifest.permission#READ_PHONE_STATE, are handled to ensure a consistent device ID. This is particularly important for maintaining a stable device ID in existing applications. Especially on Android 6-9 do not call this different order of permission handling than you call initialize(Context, ComputationSiteParameters, ApiInitListener)
Iterable of DataSet objects for all updatable datasets. Returns an empty iterable if no datasets are configured for updates.
|
inherited |
|
inherited |
|
inherited |
Get the device id for this device Only works if ApiHelper isInitialized or getDeviceId(Context context) has been called
|
inherited |
Get the device id and store it for further calls - even if ApiHelper is not initiailized yet, but requires a context
|
inherited |
|
inherited |
Get the device id for this device Only works if ApiHelper isInitialized or getDeviceId(Context context) has been called
| ComputationSiteParameters getInitParameters | ( | ) |
|
protectedinherited |
Requests Server for a license - if granted api is reinitialized, otherwise apiInit error is received
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| ApiError initialize | ( | ComputationSiteParameters | csParams, |
| ApiInitListener | listener | ||
| ) | throws RuntimeException |
Initialize the Api asynchronously. The callbacks of the passed ApiInitListener indicate success or error subsequent calls on an already initialized api will not lead to further result callbacks
| csParams | - computations site params for all modules, see ComputationSite |
| listener | - listener for initialization result |
ApiError#OK if initialization process is started ApiError#WRONG_PATH if initPaths(String) is not called or paths are null | RuntimeException | if the paths to the runtime data set via initPaths(String) and the appropriate sub folder (/data, /res, /user, /temp, /mapservices.xml ) do not exist on the device. |
| ApiError initialize | ( | Context | applicationContext, |
| ComputationSiteParameters | csParams, | ||
| ApiInitListener | listener | ||
| ) | throws RuntimeException |
Initialize the Api asynchronously. The callbacks of the passed ApiInitListener indicate success or error subsequent calls on an already initialized api will not lead to further result callbacks
| applicationContext | Application Context |
| csParams | - computations site params for all modules, see ComputationSite |
| listener | - listener for initialization result |
ApiError#OK if initialization process is started ApiError#WRONG_PATH if initPaths(String) is not called or paths are null | RuntimeException | if the paths to the runtime data set via initPaths(String) and the appropriate sub folder (/data, /res, /user, /temp, /mapservices.xml ) do not exist on the device. |
initialize(ComputationSiteParameters, ApiInitListener) instead.
|
protected |
Sets the application context for the SDK.
This method is required to be called before initialize(ComputationSiteParameters, ApiInitListener). The SDK uses this context to access application-specific resources and services, such as file system paths for storing map data, and to generate a device ID for licensing.
| context | The application\'s context. Must not be null. |
|
inherited |
helper function to set the paths for the API, must be called before Initialization
| apiDirPath | - absolute path to main application directory, this has to contain the folders/files: data, res, user, temp, mapservices.xml |
|
inherited |
helper function to set the paths for the API, must be called before Initialization
| 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. |
|
inherited |
the paths for the API, must be called before initialization
| 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) |
|
static |
|
inherited |
|
inherited |
|
inherited |
| boolean isSensorDataUsageEnabled | ( | ) |
|
inherited |
Called if changes in the list of licenced features occurs
Implements LicenceListener.
|
inherited |
Called if the licence is invalid
| error | - errorcode describing whay the licence is invalid |
Implements LicenceListener.
|
inherited |
Retrieves a list of all possible map types
Implements ApiListener.
| void onApiInitError | ( | final ApiError | err, |
| final String | description | ||
| ) |
callback when Api init fails
Implements ApiInitListener.
|
inherited |
extract result and redirect to apiListener
| void onApiInitialized | ( | ) |
callback when Api is initialized in GL view. Attention: Callback returns on the GL thread and not on the main ui thread
Implements ApiInitListener.
| void onApiUninitialized | ( | ) |
callback when api is uninitialized
Implements ApiInitListener.
|
inherited |
execute task on APIThread
| task | - task to execute |
|
inherited |
execute task on APIThread
| task | - task to execute |
|
inherited |
execute task on APIThread with low priority. This will be exuted if no other default priority Task are enqueued.
| task | - task to execute |
|
inherited |
execute task on APIThread with high priority
| task | - task to execute |
|
inherited |
execute task on APIThread with low priority. This will be exuted if no other default priority Task are enqueued.
| task | - task to execute |
|
inherited |
execute task on APIThread with low priority
| task | - task to execute |
|
inherited |
remove a listener for only api general callback - used by the mapviewers
| listener | to remove |
|
inherited |
remove a listener for api related events like init / uninit
Only needed for IwMapView, app registers this listener with initialization
| listener | to remove |
|
inherited |
remove a listener for licence info
| listener | to remove |
| void setAllowResourceUpdate | ( | boolean | allowResourceUpdate | ) |
|
protectedinherited |
|
inherited |
Stop current location manager and use the new one
| newLocationManager | - new locationmanager to set |
| void setSensorDataUsageEnabled | ( | boolean | enable | ) |
enable sensor data usage for matching
|
inherited |
Stop current sensor manager and use the new one
| newSensorManager | - new snsormanager to use |
|
inherited |
sets the path to the speech files, from inside the API, don't call from application
| path | to the speech files |
|
protectedinherited |
start the thread that runs the API
|
protectedinherited |
Stop the ApiThread and null its instance
|
protectedinherited |
|
inherited |
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.
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.
|
protectedinherited |
if API thread running, we can uninit
Noify listener
|
protectedinherited |
Stop location updates and deactivate manangers
|
protectedinherited |
Paths for API
|
protectedinherited |
|
protectedinherited |
Register as API Listener and redirect callbacks to multiple clients
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Api Thread. Started on API initialize call
|
protectedinherited |
|
protectedinherited |
Device infos for native API part
|
protectedinherited |
IMEI of device if available
|
protectedinherited |
Register as API Init Listener and redirect callbacks to multile clients
|
protectedinherited |
Register as API Licence Listener
|
protectedinherited |
|
protectedinherited |
location and orientation updates
|
protectedinherited |
|
protectedinherited |