Skip to content

//sorisdk/com.iplateia.sorisdk/SORIAudioRecognizer/getServiceIntent

getServiceIntent ​

[androidJvm]
fun getServiceIntent(ctx: Context, title: String? = "SORI Audio Recognizer", body: String? = "Listening...", icon: Int? = android.R.drawable.ic_menu_info_details): Intent

Creates an intent to start the SORI Audio Recognition Service. This intent can be used to start the service from an activity or another component. example usage:

kotlin
val intent = SORIAudioRecognizer.getServiceIntent(this)
this.startForegroundService(intent)

Return ​

An intent to start the SORI Audio Recognition Service.

Parameters ​

androidJvm

ctxThe context from which the service is started.
titleThe title of the notification. (optional)
bodyThe body of the notification. (optional)
iconThe icon resource ID for the notification. (optional)