MapTrip SDK Android Manual 9.8.8
Language Class Reference

This class configures the language that is used for navigation advices
More...

+ Inheritance diagram for Language:

Public Member Functions

boolean equals (Object o)
 
native String getCountryCode ()
 
native String getLanguageCode ()
 
native String getLanguageName ()
 
native String getLanguageNameEnglish ()
 
native String getPath ()
 
native boolean isTTSLanguage ()
 
ApiError setAsActiveLanguage ()
 

Static Public Member Functions

static native Language getActiveLanguage ()
 
static native Iterable< LanguagegetAvailableLanguages ()
 

Detailed Description

The provided languages are located in the resource folder. The settings.ini file stores the last activated persistently so that it is loaded again at the next Api.initialize() call. If the stored setting is invalid the best possible alternative is chosen by the following criteria:

  • if the stored language is a text to speech (TTS) language but TTS languages are not licenced, the matching non-tts version is loaded
  • if the stored language is not available, the system language is loaded
  • if the system language is not available the german language is loaded
  • if the system language and the german language are not available the english language is loaded
  • if the system, german and english language are not available the first available language in the language iterator is loaded

Member Function Documentation

◆ equals()

boolean equals ( Object  o)
inherited

◆ getActiveLanguage()

static native Language getActiveLanguage ( )
static

@nchor mta_lng_getActiveLanguage

Returns
the currently used and therefore active language.

◆ getAvailableLanguages()

static native Iterable< Language > getAvailableLanguages ( )
static

Returns
iterator of type language for all available ones

◆ getCountryCode()

native String getCountryCode ( )

Returns
the two-letter ISO 3166-1 country code. This code is empty, if the SDK does not distinguish between the variation of one language in different countries.

◆ getLanguageCode()

native String getLanguageCode ( )

Returns
the two-letter ISO 639-1 language code

◆ getLanguageName()

native String getLanguageName ( )

Returns
language name in the respective language.

◆ getLanguageNameEnglish()

native String getLanguageNameEnglish ( )

Returns
language name in english

◆ getPath()

native String getPath ( )

Returns
path to the resource files of the language

◆ isTTSLanguage()

native boolean isTTSLanguage ( )

Returns
true if the language supports Text-To-Speech (TTS).

◆ setAsActiveLanguage()

ApiError setAsActiveLanguage ( )

Set the active language which is currently used in the application. The active language setting is persistently stored in the settings.ini file at SystemAttribute.API_OS_USER_DATA_PATH

Returns
Errorcode

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