Package com.iplateia.sorisdk
Interface IMetadataProvider
-
- All Implemented Interfaces:
public interface IMetadataProviderInterface for delegate the metadata to be sent to the server. You can implement this interface to what metadata you want to send to the server. The metadata which is sent to the server will be passed through the webhook.
It is useful when you want to identify the user who is successfully authenticated or recognized audio. Each time SORIAudioRecognizer authorized successfully, founds a campaign, and user clicks on it, the metadata will be passed to the webhook URL.
Please note that, the metadata that sent to the server will never be stored or used for any other purpose.
example implementation:
class CustomMetadataProvider : IMetadataProvider { override fun getMetadata(): Map<String, String> { // TODO: get metadatq from the app user return mapOf( "user" to "user123", "ageGroup" to "21-30", "gender" to "female", ) } } // setup the metadata provider SORIAUdiodioRecognizer.metadataProvider = CustomMetadataProvider() val sori = SORIAUdiodioRecognizer("your_app_id", "your_secret_key") sori.startRecognition(this)
-
-
Method Summary
Modifier and Type Method Description abstract Map<String, String>getMetadata()-
-
Method Detail
-
getMetadata
abstract Map<String, String> getMetadata()
-
-
-
-