I'm trying to implement ReachFive in my android app and I have to call the initialize method.
This is how they call it in the documentation:
// Initialize the ReachFive client
client.initialize({ providers ->
// On success, do something with the retrieved list of providers registered for this ReachFive client
// ...
}, {
// On failure, log the error message returned by the ReachFive client
Log.d("Reach5_MainActivity", "ReachFive init ${it.message}")
})
But this code sample is in Kotlin and I have no idea how to call the initialize method in java.
Edit: This is the initialize function find inside the SDK code:
fun initialize(
success: Success<List<Provider>> = {},
failure: Failure<ReachFiveError> = {}
): ReachFive {
reachFiveApi
.clientConfig(mapOf("client_id" to sdkConfig.clientId))
.enqueue(
ReachFiveApiCallback<ClientConfigResponse>(
success = { clientConfig ->
scope = clientConfig.scope.split(" ").toSet()
providersConfigs(success, failure)
},
failure = failure
)
)
return this
}