Skip to content

Commit

Permalink
Add a clearAdInstance method to manually remove/clear the Ad.
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzNotABug committed Jul 24, 2022
1 parent 650eea2 commit 87cbee8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ class AppOpenAdManager private constructor(
return !isShowingAd && isAdAvailableInternal() && isInitialDelayOver()
}

/**
* Can be used to manually remove the Ad if you cannot directly use the [Configs.showOnCondition]
*/
fun clearAdInstance() {
listener = null
appOpenAdInstance = null
}

/**
* Load Ad & optionally attach a listener.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import java.util.*
import java.util.concurrent.TimeUnit

/**
* A Base class that extends
* @see BaseObserver to handle Activity Lifecycle,
* A Base class that extends [BaseObserver] to handle Activity Lifecycle.
*
* This class is created to declare a few helper methods and variables,
* so that our main usable class does not have a lot of methods and variables.
Expand Down

0 comments on commit 87cbee8

Please sign in to comment.