QPSettings

constructor(enableTextToSpeech: Boolean = true, apiBaseUrl: String = "https://westeurope-02.quandopasso.eu/{domain}/mobile/v2", terminalsApiBaseUrl: String = "https://westeurope-02.quandopasso.eu/terminals/v1", apiDomain: String = "viasuisse", apiPollInterval: Int = 180, apiCoverageRadius: Int = 10000, bearingToleranceDegrees: Int = 45, enableBearingChecks: Boolean = true, gpsLocationMinHorizontalAccuracy: Int = 100, ignoreSpoofedGPSLocation: Boolean = false, notifiedMinDistanceInMeters: Int = 10000, notifiedTimeoutSeconds: Int = 60 * 30, syncMetricsInterval: Int = 60 * 20, language: String? = null, ttsActionFallbackLanguage: String = "en", serviceIcon: Int = R.drawable.ic_service, serviceLabel: String = "QP Location Service", serviceLabelPaused: String = "QP Location Service - suspended", enableUpdatesOnActivityDetection: Boolean = true, enableOnActivities: Array<UserActivityType> = arrayOf(UserActivityType.IN_VEHICLE), activityTransitionMessages: Array<UserActivityDetectedMessage> = arrayOf(), activationNotificationText: String = "Traffic alerts on", deactivationNotificationText: String = "Traffic alerts off, Auto-start active", serviceNotificationIntent: PendingIntent? = null, playJingleBeforeTTS: Boolean = false, timeIntervalBetweenJingleAndTts: Double = 2.0, jingleURL: Uri? = null, jingles: Array<QPSound>? = null, cacheJingle: Boolean = true, ttsIterations: Int = 0, ttsIterationDelay: Double = 2.0, avsEnteredNotificationTitle: String = "Quandopasso", enableNotificationOnEnter: Boolean = true, categoriesFiltered: List<Int> = mutableListOf(), forceAudioToDeviceSpeaker: Boolean = false, forcedDeviceSpeakerVolume: Float = 0.8f, psk: MutableMap<String, String> = mutableMapOf(), apiKey: String = "quand0pass0@test", categoriesUrl: String? = null, floatingCarDataApiBaseUrl: String = "https://westeurope-02.quandopasso.eu/quandopasso/fcd/v1/", floatingCarDataEnabledOnActivity: Boolean = true, floatingCarDataEnabledWithAVS: Boolean = false, floatingCarDataServiceInterval: Int = 300, floatingCarDataRequestBatchSize: Int = 3, gpsLocationMinUpdateIntervalMillis: Long = 5000, gpsLocationIntervalMillis: Long = 5000, gpsLocationMaxUpdateDelayMillis: Long = 5000, gpsLocationMinUpdateDistanceMeters: Float = 5.0f, persistRetention: Int = 60 * 10)

Parameters

enableTextToSpeech

(default = true ) - activate vsign message reading via TTS (default: true)

apiBaseUrl

(default = "https://westeurope-01.quandopasso.it/{domain}/mobile/v2" ) - QuandoPasso API base url

apiDomain

(default = "viasuisse" ) - QuandoPasso Domain identifier

apiPollInterval

(default = 180 ) - Interval used to fetch vsigns from the API (default: 15s)

apiCoverageRadius

(default = 10000 ) - Determines the coverage radius for the vsigns returned by the API (meters) (default: 3000m)

bearingToleranceDegrees

(default = 45 ) - Tolerance in degrees used when calculating the entering angle for a vsign (default: 45deg)

enableBearingChecks

(default = true ) - Enable or disable bearing checks when entering a vsign (default: true)

notifiedTimeoutSeconds

(default = 180 ) - Determines for how long an already notified vsign won't be notified again if the user re-enters it. (default: 30 min)

gpsLocationMinHorizontalAccuracy

(default = 100 ) - Determines the min. accuracy in meters for GPS locations to be considered by the engine (default: 100 m)

ignoreSpoofedGPSLocation

(default = false ) - If true, mocked locations (as detected by the system) are discarded (default: false)

syncMetricsInterval

(default = 1200 ) - Interval (in seconds) to send metrics to the API (default: 60s)

language

(default = null ) - Language code for TTS and messaging (default: system language)

serviceIcon

(default = default sdk icon ) - Resource ID (int) for the icon displayed in the service notification tray

serviceLabel

(default = "QP Location Service" ) - Title to be displayed as the foreground service name in the notification tray

serviceLabelPaused

(default = "QP Location Service - suspended" ) - Title to be displayed as the foreground service name in the notification tray when the SDK is in suspended mode

enableUpdatesOnActivityDetection

(default = true ) - Automatically enable/disable vsign detection and main SDK functionality based on the detected user activity (default: true)

enableOnActivities

( default = UserActivityType.IN_VEHICLE ) - List of UserActivityTypes that will enable the SDK main functionality when detected on enter (default: UserActivityType.IN_VEHICLE)

activityTransitionMessages

( default = arrayOf() ) - List of UserActivityDetectedMessage, containing the text that will be read by the Text-to-speech service when the configured activity type transitions are detected (default: empty list, no TTS messages)

activationNotificationText

( default = "Traffic alerts on" ) - Notification text displayed in the service notification tray when the SDK gets activated

deactivationNotificationText

( default = "Traffic alerts off, Auto-start active" ) - Notification text displayed in the service notification tray when the SDK gets de-activated

serviceNotificationIntent

( default = null ) - optional PendingIntent to trigger when the user taps on the service notification bubble. Useful to display a UI screen from the host app when the users taps the notification.

playJingleBeforeTTS

( default = false ) - Determines whether or not play a Jingle before a tts message. Default is false.

timeIntervalBetweenJingleAndTts

( default = 2.0 ) - Value (in seconds) to determine the delay between Jingle and TTS message. Default is 2.

jingleURL

( default = null ) - The remote URL from where download the file. Example for remote URL: Uri.parse("https://doc.quandopasso.com/jingles/notification1.mp3")

cacheJingle

( default = true ) - Determines whether or not cache the jingle file after first download. Default is false.

ttsIterations

( default = 0 ) - Number of TTS messages will be repeated. If not defined or zero messages wont be repeated. Default is 0.

ttsIterationDelay

( default = 2.0 ) - Value (in seconds) to determine the delay between TTS messages iterations. Default is 5.

avsEnteredNotificationTitle

( default = "Quandopasso" ) - Title of the entered notification (default: "Quandopasso")

enableNotificationOnEnter

( default = true) - Enable or disable notification (default: true)

categoriesFiltered

( default = empty list) - The list of IDs of the filtered categories

forceAudioToDeviceSpeaker

( default = false) - If set to true forces the audio to be played out of the device's speaker. Use forcedDeviceSpeakerVolume to force also the volume of the output.

forcedDeviceSpeakerVolume

( default = 0.8 ) - Set this variable to force the volume of the audio to be played out of the device's speaker. This works only if forceAudioToDeviceSpeaker is set to true. Accepts value in a range from 0.0 to 1.0. Default is 0.8.

psk
  • List of PSK

apiKey
  • API Key

floatingCarDataApiBaseUrl

( default = https://westeurope-01.quandopasso.it/quandopasso/fcd/v1 ) - FCD API base url

floatingCarDataEnabledOnActivity

( default = true ) - FCD enabled on activity changes

floatingCarDataEnabledWithAVS

( default = false ) - FCD enabled on specific AVS

floatingCarDataServiceInterval

( default = 300 ) - FCD interval in seconds

floatingCarDataRequestBatchSize

( default = 3 ) - FCD request batch size

gpsLocationIntervalMillis

( default = 5000 ) - Sets the desired interval of location updates.

gpsLocationMinUpdateIntervalMillis

( default = 5000 ) - Sets the fastest allowed interval of location updates.

gpsLocationMaxUpdateDelayMillis

( default = 5000 ) - Sets the longest a location update may be delayed.

gpsLocationMinUpdateDistanceMeters

( default = 5 ) - Sets the minimum distance required between consecutive location updates.