googleads-mobile-android-examples
googleads-mobile-android-examples copied to clipboard
AppOpenExample hangs on Splash Screen when no internet or behind adblocker.
I expect it to resume to MainActivity.
Would this be ok?
if (consentError != null) {
// Consent not obtained in current session.
startMainActivity();
}
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?
@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();
}