MCPcopy Create free account
hub / github.com/EXALAB/AnLinux-App / loadRewardedAd

Method loadRewardedAd

AnLinux/app/src/main/java/exa/lnx/a/MainUI.java:995–1022  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

993 });
994 }
995 public void loadRewardedAd(){
996 RewardedAd.load(
997 new AdRequest.Builder("ca-app-pub-5748356089815497/2390763032").build(),
998 new AdLoadCallback<RewardedAd>() {
999 @Override
1000 public void onAdLoaded(@NonNull RewardedAd ad) {
1001 // Called when an ad has loaded.
1002 ad.setAdEventCallback(new RewardedAdEventCallback() {
1003 @Override
1004 public void onAdShowedFullScreenContent() {
1005 // Code to be invoked when the ad showed full screen content.
1006 }
1007
1008 @Override
1009 public void onAdDismissedFullScreenContent() {
1010 rewardedAd = null;
1011 // Code to be invoked when the ad dismissed full screen content.
1012 }
1013 });
1014 rewardedAd = ad;
1015 }
1016
1017 @Override
1018 public void onAdFailedToLoad(@NonNull LoadAdError adError) {
1019 // Called when ad fails to load.
1020 }
1021 });
1022 }
1023 /*private AdSize getAdSize() {
1024 // Step 2 - Determine the screen width (less decorations) to use for the ad width.
1025 Display display = getWindowManager().getDefaultDisplay();

Callers 1

onResumeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected