Explore More
Explore More is a new feature introduced in the SDK version 5.1.2
. This feature allows you to show and additional Recommendations widget when user navigates away from an article page.
It works by triggering the SDK when the app detects a user is navigating back and provides a callback that can be used to perform the navigation after the EM widget has been dismissed.
The feature has trigger limits that can be set on the backend side in order to not show the EM widget too often.
Implementation
In order to trigger the Explore More widget you should call the following function:
Outbrain.handleExploreMore(this@MainActivity) {
runOnUiThread {
// Perform back navigation
}
}
It is also possible to perform the back navigation before triggering the handleExploreMore
function. In order to catch the Android system back button press you should implement the following call:
override fun onBackPressed() {
Outbrain.handleExploreMore(this) {
super.onBackPressed()
}
}