QPEngine

object QPEngine

QPEngine

Singleton class used by clients to integrate QuandoPasso SDK functionalities in their apps.

Properties

Link copied to clipboard
Link copied to clipboard
var onEvent: (QPEvent) -> Unit?
Link copied to clipboard
lateinit var settings: QPSettings

Functions

Link copied to clipboard
Link copied to clipboard

Prompt the user with the required Battery permission popup

Link copied to clipboard

Clear the cached Jingle

Link copied to clipboard
Link copied to clipboard

Get Permission details

Link copied to clipboard

Get secure status

Link copied to clipboard

Returns the current SDK build version

Link copied to clipboard
fun initialize(context: Context, settings: QPSettings)

Initialize the SDK.

Link copied to clipboard
fun isCategoryFiltered(categoryId: Int?, list: List<Int> = settings.categoriesFiltered): Boolean
Link copied to clipboard

Get Service is running

Link copied to clipboard
fun loadCategories(callback: (List<QPCategory>) -> Unit? = null)

Retrieve the VSign categories.

Link copied to clipboard
Link copied to clipboard

Prompt the user with the required permission popup

Link copied to clipboard

Set debug log (default = false)

Link copied to clipboard
fun setJingle(context: Context, url: Uri?, cacheFile: Boolean = false)

Set the URL from where retrieve the jingle file.

Link copied to clipboard
fun speak(context: Context, text: String?, language: String? = null, useIterationSettings: Boolean = false)

Reproduce a message to read according to Text-To-Speech activation

Link copied to clipboard
fun start(context: Context)

Initialize and start all required services, like GPS updates.

Link copied to clipboard
Link copied to clipboard
fun stop(context: Context)

Stops the QPEngine instance and unsubscribe from any notifications. Calling this method also stops the foreground service used to track location updates. It is recommended to call this method when the main app activity is destroyed to make sure the service is also detached.

Link copied to clipboard
Link copied to clipboard
fun updateSettings(jsonFile: File): List<String>

Update Settings with a JSON File

fun updateSettings(json: String, settings: QPSettings = this.settings): List<String>

Update Settings with a JSON