You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DefaultLifecycleObserver methods in MyApplication are not called at all. I think this can be solved moving the initialization methods (registerActivityLifecycleCallbacks(this), ProcessLifecycleOwner.get().lifecycle.addObserver(this)) from DefaultLifecycleObserver. onCreate(owner: LifecycleOwner) to Application.onCreate().
The text was updated successfully, but these errors were encountered:
I have also been facing this issue. It always calls the onAdFailedToLoad callback but when I add a delay it shows fine. I am not sure if adding a delay in showing App Open Ad allowed or would it cause "Modified Ad Behavior" policy violation.
By delay I mean:
`override fun onStart(owner: LifecycleOwner) {
super.onStart(owner)
addDelay()
}
private fun addDelay() {
CoroutineScope(Dispatchers.Main).launch {
delay(100) // Delay for 2 seconds (2000 milliseconds)
// Code after delay
println("Delay finished.")
currentActivity?.let { appOpenAdManager.showAdIfAvailable(it) }
}`
The DefaultLifecycleObserver methods in MyApplication are not called at all. I think this can be solved moving the initialization methods (registerActivityLifecycleCallbacks(this), ProcessLifecycleOwner.get().lifecycle.addObserver(this)) from DefaultLifecycleObserver. onCreate(owner: LifecycleOwner) to Application.onCreate().
The text was updated successfully, but these errors were encountered: