Android AdWhirl AdMob + InMobi 奇怪的行为

发布于 2024-11-14 09:05:18 字数 613 浏览 3 评论 0原文

我已成功将 AdWhirl (v3.0) 与 InMobi 中的 AdMob 集成。 现在,当我的应用程序将广告从 AdMob 更改为 InMboi 时,会出现奇怪的动画(一些白色背景的 InMobi 动画)。

我也有广告高度的问题。此处的代码片段

    int diWidth = 320;
    int diHeight = 52;
    float density = mContext.getResources().getDisplayMetrics().density;

    adWhirlLayout.setMaxWidth((int) (diWidth * density));
    adWhirlLayout.setMaxHeight((int) (diHeight * density));

问题是 setMaxHeight 确实将高度设置为 52 * 密度,但 InMobi 使用 48 * 密度。因此,InMobi 广告下方有空白区域。

(在 AdWhirl 中)是否有任何我可以处理广告更改的事件?有处理动画的事件吗?

对于解决与 AdWhirl 相关的这两个问题有什么想法吗?

10 倍

问候

I have successfully integrate AdWhirl (v3.0) with AdMob in InMobi.
Now when my app changes ad from let's say AdMob to InMboi strange animation appears (some white backgrounded InMobi animation).

I also have problem with heights of ads. Code snippet here

    int diWidth = 320;
    int diHeight = 52;
    float density = mContext.getResources().getDisplayMetrics().density;

    adWhirlLayout.setMaxWidth((int) (diWidth * density));
    adWhirlLayout.setMaxHeight((int) (diHeight * density));

Problem is that this setMaxHeight does set height to 52 * density but InMobi uses 48 * density. And because of that there is white space below InMobi ad.

Is there (in AdWhirl) any event that I can handle ad change? Any event for handling animations?

Any ideas for solution of these two problems relating AdWhirl?

10x

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜司空 2024-11-21 09:05:18

高度问题

您可以使用 Adwhirl 中的“自定义事件”在广告发生更改时收到通知: http://code.google.com/p/adwhirl/wiki/CustomEvents

在您的回调中,您可以将其进行比较:

if("inmobi".equals(adWhirlLayout.activeRation.name) {
    //set adWhirlLayout height as 48
} else if("admob".equals(adWhirlLayout.activeRation.name) {
    //set adWhirlLayout height as 52
}

动画问题

动画的发生是因为不同网络上的广告发生变化。目前没有 API 可以停止动画。对于未来的 InMobi SDK 版本,我们将考虑提供此 API 并相应地发布更新的 InMobiAdapter。

(全面披露:我在 InMobi 担任工程师。)

Height Issue

You can use the "custom events" in Adwhirl to get notified when the ad change happens: http://code.google.com/p/adwhirl/wiki/CustomEvents

In your call back you can compare as:

if("inmobi".equals(adWhirlLayout.activeRation.name) {
    //set adWhirlLayout height as 48
} else if("admob".equals(adWhirlLayout.activeRation.name) {
    //set adWhirlLayout height as 52
}

Animation Issue

The animation happens because of the Ad change across different networks. Presently there is no API to stop the animation. For future InMobi SDK releases we will consider providing this API and publish the updated InMobiAdapter accordingly.

(Full Disclosure: I work as an engineer with InMobi.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文