禁止 StartApp SDK 在活动可见时自动显示广告。

huangapple go评论65阅读模式
英文:

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=&quot;com.startapp.sdk.adsbase.activities.OverlayActivity&quot;
android:configChanges=&quot;orientation|screenSize|screenLayout|keyboardHidden&quot;
android:theme=&quot;@android:style/Theme.Translucent&quot;/&gt;

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, &quot;StartApp App ID&quot;, 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

&lt;meta-data
        android:name=&quot;com.startapp.sdk.APPLICATION_ID.RETURN_ADS_DISENABLED&quot;
        android:value=&quot;ur app id&quot; /&gt;

答案3

得分: 0

你可以这样编写:

StartAppSDK.init(this, "StartApp 应用 ID");
StartAppAd.disableAutoInterstitial(); 
StartAppSDK.setTestAdsEnabled(BuildConfig.DEBUG);  // 用于测试广告
英文:

You can write like this

StartAppSDK.init(this, &quot;StartApp App ID&quot;);
StartAppAd.disableAutoInterstitial(); 
StartAppSDK.setTestAdsEnabled(BuildConfig.DEBUG);// this for test ad

huangapple
  • 本文由 发表于 2020年9月22日 10:46:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/64002382.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定