//sorisdk/com.iplateia.sorisdk/SORIListener
SORIListener
Android SDK documentation
See the Android 5.2.0 implementation guide for current integration instructions and the Android 5.2.0 API reference for public SDK APIs, including pause and resume.
open class SORIListener : ISORIListener
Default implementation of the ISORIListener interface with empty method bodies.
This class provides a convenient base implementation where all methods have empty bodies. Extend this class when you only need to implement specific callbacks rather than all interface methods.
Usage Example
kotlin
class MyCampaignListener : SORIListener() {
override fun onCampaignFound(campaign: SORICampaign) {
// Only implement the callbacks you need
processCampaign(campaign)
}
override fun onNetworkError(materialId: String, error: String) {
// Handle network errors
Log.w("SORI", "Network error: $error")
}
}Since
1.0.0
See also
| ISORIListener | for the complete interface definition |
Constructors
| SORIListener | [androidJvm] constructor() |
Functions
| Name | Summary |
|---|---|
| onCampaignFound | [androidJvm] open override fun onCampaignFound(campaign: SORICampaign) Called when the Audio Recognition Service detects a campaign based on the audio input. |
| onError | [androidJvm] open override fun onError(error: String) Called when the Audio Recognition Service encounters an error. |
| onNetworkError | [androidJvm] open override fun onNetworkError(materialId: String, error: String) Called when a network error occurs while posting activity to the SORI API. |
| onReady | [androidJvm] open override fun onReady() Called when the Audio Recognition Service is ready and started. |
| onRequestQueued | [androidJvm] open override fun onRequestQueued(materialId: String, queueCount: Int) Called when a request is queued for delayed sending due to network unavailability. |
| onStateChanged | [androidJvm] open override fun onStateChanged(state: String) Called when the Service State changes. |
