TargetURLHandlerInterface

The interface of object responsible for processing the URL that the SDK wants to open in the browser.

You can create an object of this interface and pass it into Advertisement in cases where you want to override the default URL handling behaviour.

This can be useful, for example, if you want to open a browser inside the application instead of opening an external one, or if you want to modify the URL before opening it.

class CustomerTargetURLHandler() : TargetURLHandlerInterface {
override fun isValidURL(url: Uri): Boolean {
// Here you can do what you want to do....
return true
}


override fun handleURL(url: Uri) {
// Here you can do what you want to do....
}
}

Functions

Link copied to clipboard
abstract fun handleURL(url: Uri)

A method for processing an URL that should be opened in the browser. On it you can modify the URL, as you need, and open a browser inside the application.

Link copied to clipboard
open fun isValidURL(url: Uri): Boolean

A method to validate an URL before opening in browser. This method is optional and always returns true by default.