我们应该preFER的AdMob在谷歌Play业务相比,"老" AdMob的SDK [英] Should we prefer AdMob in Google Play services compared to "old" AdMob SDK

查看:116
本文介绍了我们应该preFER的AdMob在谷歌Play业务相比,"老" AdMob的SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我才意识到谷歌AdMob的嵌入到最新的谷歌播放服务(4 +)

I just realized Google embeds AdMob into latest Google Play services (4+)

我在想,我应该preFER <一href="https://developers.google.com/mobile-ads-sdk/docs/#play">https://developers.google.com/mobile-ads-sdk/docs/#play在<一个href="https://developers.google.com/mobile-ads-sdk/docs/#android">https://developers.google.com/mobile-ads-sdk/docs/#android ?由于我没有看到谷歌的官方站上这一点。

I was wondering, should I prefer https://developers.google.com/mobile-ads-sdk/docs/#play over https://developers.google.com/mobile-ads-sdk/docs/#android ? As I do not see Google official stand on this.

我想问这样的原因,我发现的从谷歌Play业务的AdMob是pretty的车不动。

The reason I ask so, I found AdMob from Google Play services is pretty buggy still.

这是我的观察。

  1. 创建一个智能的旗帜从Java code,并将其放置在一个滚动视图的中间。
  2. 当智能旗帜成功地获取从谷歌服务器上的广告,滚动视图将自动滚动,使智能旗帜可见。

这似乎是从我的角度来看一个意外的行为。这就是为什么,我还是义无反顾地移植了新的谷歌游戏服务。

This seems to be an undesired behavior from my point of view. That's why, I still hesitate to migrate over new Google Play services.

完整的源$ C ​​$ C证明错误可以在这里找到:<一href="http://stackoverflow.com/questions/19971337/abmod-from-google-play-services-will-perform-undesired-auto-scrolling">AbMod从谷歌Play业务将执行不希望自动滚动

The full source code to demonstrate the bug can be found here : AbMod from Google Play services will perform undesired auto scrolling

推荐答案

如果您要集成多个广告SDK,如果他们使用的是谷歌播放服务的后端支持,提供广告,你也想显示Admob的横幅广告那么你应该使用它。

If you want to integrate many ads SDK and if they are using Google play services as back-end support to deliver ads and you also want to show Admob banner ads then you should use it.

它非常容易使用。只是加古尔播放服务的lib项目,然后用

its very easy to use .just add goole play service lib project and then use

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:ads="http://schemas.android.com/apk/res-auto"

              android:id="@+id/linearLayout"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">
    <com.google.android.gms.ads.AdView android:id="@+id/adView"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         ads:adUnitId="a1529793ead3391"
                         ads:adSize="BANNER"/>

</LinearLayout>

现在你可以简单的添加下面要展示片段中的活性

now you can simple add following snippet in activity where you want to show

 AdView adView = (AdView)findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().build();
    adView.loadAd(adRequest);

这篇关于我们应该preFER的AdMob在谷歌Play业务相比,&QUOT;老&QUOT; AdMob的SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆