Processing of interest expression point of the users
User Interest Listener
When using GfpAdLoader
, link the callback that informs when the user expressed interest (1-second exposure with 100% of the ad section by SDK definition) and when the interest disappeared (exposure of 0% or less of the ad section by SDK definition). The usage method is as follows.
- Kotlin
- Java
val adLoader = GfpAdLoader.Builder(context, adParam)
.withUserShowInterestListener { showInterest ->
if (showInterest) {
// ad view exposed 100% and 1 sec duration.
// ex) change a cta button color
} else {
// ad view exposed 0% (hide)
// ex) restore a cta button color
}
}
.build()
GfpAdLoader adLoader = new GfpAdLoader.Builder(context, adParam)
.withUserShowInterestListener(showInterest -> {
if (showInterest) {
// ad view exposed 100% and 1 sec duration.
// ex) change a cta button color
} else {
// ad view exposed 0% (hide)
// ex) restore a cta button color
}
})
.build();