I hope someone can give information about this. I display interstitial ads with Admob. Some of them have music or sounds and my users get terrible annoyed because of this. So, does anyone know if there is a way to block ads with music or sound? Is there anyway to decline access to the loud speaker for the ads? Thanks
How much do interstitial ads pay? With the right implementation, and using playable and video interstitials, developers can reach $10-$20 eCPMs in tier 1 countries. The average eCPM for interstitial ads range from $4-$6.
Show the ad Between levels of a game is a good example, or after the user completes a task. To show an interstitial, use the show() method. Log. d("TAG", "The interstitial ad wasn't ready yet.")
The AdMobInterstitial item allows monetizing your app with fullscreen interstitial ads on Android and iOS.
It is recommended to put not more than one interstitial ad after every two user actions within an app. Although this might also be too much for your users, so keep an eye on your retention rate.
I had the same issue. I was shocked to hear some audio in background too. This is what I did. Mute the sound before showing the ad. Unmute the sound onAdClosed() of AdListener. You can set the adListener on the interstitial ad while loading the ad.
private InterstitialAd interstitialAd; private void showTheAd(){ _muteSound(); interstitialAd.show(); } private void loadAd(){ interstitialAd = new InterstitialAd(context); interstitialAd.setAdUnitId("ca-app-pub-XXXXXXx/XXXXXXXX"); AdRequest adRequest = new AdRequest.Builder().addTestDevice( AdRequest.DEVICE_ID_EMULATOR).build(); interstitialAd.loadAd(adRequest); interstitialAd.setAdListener(new AdListener() { public void onAdClosed(){ _unmuteSound(); } }); } private void _unmuteSound(){ AudioManager aManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); aManager.setStreamMute(AudioManager.STREAM_MUSIC, false); } private void _muteSound(){ AudioManager aManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); aManager.setStreamMute(AudioManager.STREAM_MUSIC, true); }
to mute an ad, just call MobileAds.setAppmuted(true)
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); // Set app volume to be half of current device volume. MobileAds.setAppVolume(0.5f); // or setAppMuted(true); to mute ... }
from their forum page: https://groups.google.com/forum/#!topic/google-admob-ads-sdk/X7hQeehlJBI
The Google Mobile Ads SDK for Android has methods to set the current volume for incoming ads, based on the device's current volume level.
setAppVolume(float) - available in the Android AdMob SDK version 8.4 and up. setAppMuted(boolean) - available in the Android AdMob SDK version 9.0 and up.
for further readings, refer to https://developers.google.com/admob/android/global-settings and https://developers.google.com/android/reference/com/google/android/gms/ads/MobileAds
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With