opt(ad): minus ad loading timeout
This commit is contained in:
@@ -97,16 +97,19 @@ public class SplashActivity extends BaseActivity {
|
|||||||
private void fetchSplashAD() {
|
private void fetchSplashAD() {
|
||||||
mAdLoading = true;
|
mAdLoading = true;
|
||||||
mHandler.postDelayed(() -> {
|
mHandler.postDelayed(() -> {
|
||||||
if (mAdLoading)
|
if (mAdLoading){
|
||||||
enterNextActivity();
|
enterNextActivity();
|
||||||
}, 3000);
|
}
|
||||||
|
}, 1500);
|
||||||
mInterstitialAd = new InterstitialAd(this);
|
mInterstitialAd = new InterstitialAd(this);
|
||||||
mInterstitialAd.setAdUnitId(BuildConfig.DEBUG ? Constants.ADMOB_INTERSTITIAL_TEST_ID : Constants.ADMOB_INTERSTITIAL_ID);
|
mInterstitialAd.setAdUnitId(BuildConfig.DEBUG ? Constants.ADMOB_INTERSTITIAL_TEST_ID : Constants.ADMOB_INTERSTITIAL_ID);
|
||||||
mInterstitialAd.setAdListener(new AdListener() {
|
mInterstitialAd.setAdListener(new AdListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAdLoaded() {
|
public void onAdLoaded() {
|
||||||
mAdLoading = false;
|
mAdLoading = false;
|
||||||
mInterstitialAd.show();
|
if(!mAlreadyEnterNextActivity){
|
||||||
|
mInterstitialAd.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user