问题描述
我有一个应用程序可以完美地显示插页式广告,但它们只是图像,作为以视频为生的一代,我认为允许 Admob 也显示视频广告会很有好处.
I have an application displaying interstitial ads perfectly, but they are just images, and as a generation living on videos, I think it would be beneficial to allow Admob to display Video ads as well.
我必须为此添加额外的权限吗?或者我应该做些什么不同的事情?
Do I have to add extra permissions for that? Or what I should do differently?
这是我展示广告的方式;
Here is how I display 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();
}
});
只有这两个权限;
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
广告显示很好,但它们只是图片广告,我想要视频!!
The ads are displayed fine but they are only Image ads, I want VIDEOS!!
推荐答案
无法在您的项目/应用程序中以编程方式显示视频广告.但是,在 admob 控制台中,您可以指定应在您的应用中投放的插页式广告类型(Text、Image、Video
).
There's no way to display video ads programmatically in your project/app. However, in the admob console, you can specify the kind of interstitial ad types( Text, Image, Video
) that should be served within your app.
默认情况下,应为插页式广告启用 Text、Image、Video
广告类型.如果您想仅限于视频广告,您可以禁用文字和图片广告类型,但请注意,这会导致填充率降低,从而导致收入减少.另请注意,当用户在使用您的应用程序时互联网连接不佳/缓慢时,视频广告将无法加载.
By default Text, Image, Video
ad types should be enabled for interstitials. You can disable the Text and Image ad types if you want to restrict to only video ads, however note this will lead to a lower fill rate resulting in a decrease in revenue. Also note that video ads will fail to load when users have a poor/slow internet connection while using your ap.
只需转到获利 -> 选择您的应用 -> 点击插页式广告单元 -> 启用/禁用广告类型
Just go to Monetize -> Select your app -> Click the interstitial ad unit -> Enable/Disable ad types
这篇关于允许 Admob 展示视频广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!