onScreenVisit method

void onScreenVisit()

Called on every screen visit to passively track frequency. Does NOT trigger a load — only shows if an ad is already cached. Use showBeforeNavigation for navigation-gated ad display instead.

Implementation

void onScreenVisit() {
  if (!_isSafeToOperate || !hasInterstitial || _isProUser()) return;

  _screenCount++;
  if (_screenCount >= _config.interstitialAfter) {
    _screenCount = 0;
    // Only show if already loaded — never trigger a load here.
    _triggerInterstitialIfReady();
  }
}