英文:
Disable StartApp SDK auto show ads when activity is visibile
问题
我成功地将StartApp广告添加到我的项目中,我只添加了1个横幅广告。
我的问题是,为什么全屏广告会在我的活动可见时持续显示?(例如:我在应用程序内,然后我打开YouTube而不关闭我的应用程序,当我回到我的应用程序时,会弹出全屏广告)
是否有任何解决办法可以禁用它?
我尝试删除负责该广告的此清单代码,但我的应用程序崩溃,要求该透明活动。
<activity
android:name="com.startapp.sdk.adsbase.activities.OverlayActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:theme="@android:style/Theme.Translucent"/>
广告显示的示例:
屏幕截图
英文:
I was successfully able to add StartApp ads to my project, I only added 1 banner.
My question is, why a full screen ad keeps showing when my activity is visibile? (e.g: I'm inside the app then I open YouTube without closing my app, when I get back to my app, a full screen ad pops up)
Is there any solution to disable it?
I tried removing this Manifest code who's responsible on that ad, but my app crashes asking for that transparent activity.
android:name="com.startapp.sdk.adsbase.activities.OverlayActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:theme="@android:style/Theme.Translucent"/>
Example of the ad showing:
Screenshot
答案1
得分: 1
我通过禁用返回广告来修复了它。
StartAppSDK.init(this, "StartApp App ID", false);
英文:
I fixed it by disabling return ads.
StartAppSDK.init(this, "StartApp App ID", false);
答案2
得分: 0
我已经尝试过那个,但仍然显示。
然后我添加了RETURN_ADS_DISABLED到元数据中,它起作用了。
所以我的整个元数据变成了:
<meta-data
android:name="com.startapp.sdk.APPLICATION_ID.RETURN_ADS_DISABLED"
android:value="你的应用ID" />
英文:
I'v tried that and It's still showing
Then I've add RETURN_ADS_DISENABLED to the meta dataand it works
so my whole meta data becames
<meta-data
android:name="com.startapp.sdk.APPLICATION_ID.RETURN_ADS_DISENABLED"
android:value="ur app id" />
答案3
得分: 0
你可以这样编写:
StartAppSDK.init(this, "StartApp 应用 ID");
StartAppAd.disableAutoInterstitial();
StartAppSDK.setTestAdsEnabled(BuildConfig.DEBUG); // 用于测试广告
英文:
You can write like this
StartAppSDK.init(this, "StartApp App ID");
StartAppAd.disableAutoInterstitial();
StartAppSDK.setTestAdsEnabled(BuildConfig.DEBUG);// this for test ad
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论