com.google.ads.Ad Java Examples
The following examples show how to use
com.google.ads.Ad.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdMobAdListener.java From mobile-sdk-android with Apache License 2.0 | 5 votes |
@Override public void onLeaveApplication(Ad ad) { printToClog("onLeaveApplication: " + ad); if (mediatedAdViewController != null) { mediatedAdViewController.onAdClicked(); } }
Example #2
Source File: AdMobAdListener.java From mobile-sdk-android with Apache License 2.0 | 5 votes |
@Override public void onDismissScreen(Ad ad) { printToClog("onDismissScreen: " + ad); // interstitials get this callback when the ad is closed, so ignore that if ((mediatedAdViewController != null) && (mediatedAdViewController instanceof MediatedBannerAdViewController)) { mediatedAdViewController.onAdCollapsed(); } }
Example #3
Source File: AdMobAdListener.java From mobile-sdk-android with Apache License 2.0 | 5 votes |
@Override public void onPresentScreen(Ad ad) { printToClog("onPresentScreen: " + ad); // interstitials get this callback when show is called, so ignore that if ((mediatedAdViewController != null) && (mediatedAdViewController instanceof MediatedBannerAdViewController)) { mediatedAdViewController.onAdExpanded(); } }
Example #4
Source File: AdMobAdListener.java From mobile-sdk-android with Apache License 2.0 | 5 votes |
@Override public void onFailedToReceiveAd(Ad ad, AdRequest.ErrorCode errorCode) { printToClog("onFailedToReceiveAd: " + ad + " error code: " + errorCode); ResultCode code = ResultCode.INTERNAL_ERROR; switch (errorCode) { case INTERNAL_ERROR: code = ResultCode.INTERNAL_ERROR; break; case INVALID_REQUEST: code = ResultCode.INVALID_REQUEST; break; case NETWORK_ERROR: code = ResultCode.NETWORK_ERROR; break; case NO_FILL: code = ResultCode.UNABLE_TO_FILL; break; default: break; } if (mediatedAdViewController != null) { mediatedAdViewController.onAdFailed(code); } }
Example #5
Source File: AdMobAdListener.java From mobile-sdk-android with Apache License 2.0 | 5 votes |
@Override public void onReceiveAd(Ad ad) { printToClog("onReceiveAd: " + ad); if (mediatedAdViewController != null) { mediatedAdViewController.onAdLoaded(); } }
Example #6
Source File: PhotosActivity.java From android-discourse with Apache License 2.0 | 5 votes |
@Override public void onReceiveAd(Ad arg0) { if (interstitialAd.isReady()) { interstitialAd.show(); Tools.updateInterstitialAdTime(this); } }
Example #7
Source File: GodotAdMob.java From godot_modules with MIT License | 5 votes |
@Override public void onReceiveAd(Ad ad) { if (ad == interstitial) { Log.d("godot", "AdMob: onReceiveAd"); interstitial.show(); adReceived = true; } }
Example #8
Source File: PhotoFragment.java From android-discourse with Apache License 2.0 | 4 votes |
@Override public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) { mCloseAdView.setVisibility(View.GONE); mAdView.setVisibility(View.GONE); }
Example #9
Source File: GodotAdMob.java From godot_modules with MIT License | 4 votes |
@Override public void onPresentScreen(Ad arg0) { Log.d("godot", "AdMob: onPresentScreen"); presentScreen = true; }
Example #10
Source File: GodotAdMob.java From godot_modules with MIT License | 4 votes |
@Override public void onLeaveApplication(Ad arg0) { Log.d("godot", "AdMob: onLeaveApplication"); applicationLeaved = true; }
Example #11
Source File: GodotAdMob.java From godot_modules with MIT License | 4 votes |
@Override public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) { Log.w("godot", "AdMob: onFailedToReceiveAd-> " + arg1.toString()); failedToReceiveAd = true; }
Example #12
Source File: GodotAdMob.java From godot_modules with MIT License | 4 votes |
@Override public void onDismissScreen(Ad arg0) { Log.d("godot", "AdMob: onDismissScreen"); screenDismissed = true; }
Example #13
Source File: TopicFragment.java From android-discourse with Apache License 2.0 | 4 votes |
@Override public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) { hideAdView(); }
Example #14
Source File: PhotoFragment.java From android-discourse with Apache License 2.0 | 4 votes |
@Override public void onReceiveAd(Ad arg0) { mAdView.setVisibility(View.VISIBLE); }
Example #15
Source File: TopicFragment.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onLeaveApplication(Ad arg0) { }
Example #16
Source File: TopicFragment.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onPresentScreen(Ad arg0) { }
Example #17
Source File: TopicFragment.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onReceiveAd(Ad arg0) { }
Example #18
Source File: TopicFragment.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onDismissScreen(Ad arg0) { }
Example #19
Source File: PhotosActivity.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onPresentScreen(Ad arg0) { }
Example #20
Source File: PhotosActivity.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onLeaveApplication(Ad arg0) { }
Example #21
Source File: PhotosActivity.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) { }
Example #22
Source File: PhotosActivity.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onDismissScreen(Ad arg0) { }
Example #23
Source File: PhotoFragment.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onPresentScreen(Ad arg0) { }
Example #24
Source File: PhotoFragment.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onLeaveApplication(Ad arg0) { }
Example #25
Source File: PhotoFragment.java From android-discourse with Apache License 2.0 | 2 votes |
@Override public void onDismissScreen(Ad arg0) { }