I have an application that displays interstitial ads, but these are just images, and as a generation living on video, I think it would be useful if Admob also showed video ads.
Do I need to add additional permissions for this? Or what should I do differently?
This is how I show ads,
interstitial = new InterstitialAd(Main.this); // Insert the Ad Unit ID interstitial.setAdUnitId("ca-app-pub-...442"); //Locate the Banner Ad in activity_main.xml // Request for Ads adRequest = new AdRequest.Builder() // Add a test device to show Test Ads .addTestDevice(AdRequest.DEVICE_ID_EMULATOR) .addTestDevice("") .build(); // Load ads into Banner Ads //adView.loadAd(adRequest); // Load ads into Interstitial Ads Runnable r = new Runnable () { @Override public void run() { interstitial.loadAd(adRequest); } }; runOnUiThread(r); // Prepare an Interstitial Ad Listener interstitial.setAdListener(new AdListener() { public void onAdLoaded() { // Call displayInterstitial() function displayInterstitial(); } });
And only these two permissions;
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Ads are displayed perfectly, but these are only image ads, I want VIDEOS !!
android admob
raklar
source share