File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
admob/app/src/main/java/com/google/samples/quickstart/admobexample Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 19
19
import android .os .Bundle ;
20
20
import android .support .annotation .VisibleForTesting ;
21
21
import android .support .v7 .app .AppCompatActivity ;
22
+ import android .util .Log ;
22
23
import android .view .View ;
23
24
import android .widget .Button ;
24
25
import com .google .android .gms .ads .AdListener ;
31
32
import com .google .android .gms .ads .InterstitialAd ;
32
33
// [END_EXCLUDE]
33
34
34
-
35
35
public class MainActivity extends AppCompatActivity {
36
36
37
+ private static final String TAG = "MainActivity" ;
38
+
37
39
private AdView mAdView ;
38
40
// [START_EXCLUDE]
39
41
private InterstitialAd mInterstitialAd ;
@@ -79,6 +81,12 @@ public void onAdLoaded() {
79
81
}
80
82
// [END_EXCLUDE]
81
83
}
84
+
85
+ @ Override
86
+ public void onAdFailedToLoad (int i ) {
87
+ // See https://goo.gl/sCZj0H for possible error codes.
88
+ Log .w (TAG , "onAdFailedToLoad:" + i );
89
+ }
82
90
});
83
91
// [END create_interstitial_ad_listener]
84
92
@@ -96,7 +104,6 @@ public void onClick(View v) {
96
104
});
97
105
// [END display_interstitial_ad]
98
106
99
-
100
107
// Disable button if an interstitial ad is not loaded yet.
101
108
mLoadInterstitialButton .setEnabled (mInterstitialAd .isLoaded ());
102
109
}
You can’t perform that action at this time.
0 commit comments