Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppOpenExample hangs on Splash Screen when no internet or behind adblocker. #662

Closed
mvhuizen opened this issue Apr 1, 2024 · 3 comments
Closed

Comments

@mvhuizen
Copy link

mvhuizen commented Apr 1, 2024

I expect it to resume to MainActivity.

@mvhuizen
Copy link
Author

Would this be ok?

          if (consentError != null) {
            // Consent not obtained in current session.
            startMainActivity();
          }

@NVentimiglia
Copy link
Member

Hi @mvhuizen,

Making sure there are not errors is a good practice. Can you provide any additional details on this issue? What are the exact steps you are taking to replicate this issue? Is there some sample code you could provide?

@mvhuizen
Copy link
Author

mvhuizen commented May 4, 2024

@NVentimiglia Thank you for your response.

I currently have this code in production and it seems to work fine, feel free to close this issue.

private boolean isConsentError = Boolean.FALSE;


if (consentError != null) {
    // Consent not obtained in current session.
    isConsentError=true;
    Log.w(
            LOG_TAG,
            String.format(
                    "%s: %s", consentError.getErrorCode(), consentError.getMessage()));
}


if (googleMobileAdsConsentManager.canRequestAds()||(isConsentError)) {
    showInterstitial();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants