如何与AdRequest提供的位置,现在的AdMob已经成为谷歌播放服务的一部分吗? [英] How to supply location with an AdRequest now that AdMob has become part of the Google Play Services?

查看:167
本文介绍了如何与AdRequest提供的位置,现在的AdMob已经成为谷歌播放服务的一部分吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着的谷歌游戏的月更新服务,AdMob的整合进库,这意味着Android开发者不再需要包含在项目的库的 GoogleAdMobAdsSdk-xxxjar 文件夹。有一个很好的迁移指南解释如何从迁移 com.google.ads。* com.google.android.gms.ads。*

With the October update of the Google Play Services, AdMob was integrated into the library, which means Android developers no longer have to include the GoogleAdMobAdsSdk-x.x.x.jar in a project's libs folder. There's a nice migration guide that explains how to migrate from com.google.ads.* to com.google.android.gms.ads.*.

到目前为止,一切都很好。迁移是小菜一碟,但是......总有一个但是。

So far, so good. Migrating is a piece of cake, but... There's always a "but".

previously, com.google.ads.AdRequest 曾经有一个的 的setLocation(位置) 方法,让你增强的目标信息。该选项不再可用在 com.google.android.gms.ads.AdRequest ,也没有在其的 生成器 类。

Previously, com.google.ads.AdRequest used to have a setLocation(Location) method that would allow you to augment the targeting information. That option is no longer available in com.google.android.gms.ads.AdRequest, nor in its Builder class.

我想我的问题是:在哪里,为什么去了?在其中的可能是容易回答,因为它只是似乎已被删除。我很想有人证明我错了,虽然在这里,您可以随意评论,如果我忽视的东西。这离开的为什么的。

I suppose my questions are: where and why did it go? The where is probably easily answered, because it simply seems to have been removed. I'd love for someone to prove me wrong here though, so feel free to comment if I'm overlooking something. That leaves the why.

现在我只能猜测,为什么它被删除:

Right now I can only speculate as to why it was removed:

  • 据AdMob的时候被重构成为了谷歌播放服务的一部分被忽略。
  • 出于隐私问题,谷歌已经决定不再支持此功能。
  • 由于AdMob的是,现在的谷歌播放服务的一部分,或许它与它的集成定位API (即融合位置提供者),并自动提供位置信息,如果有的话?
  • It was overlooked when AdMob was refactored to become part of the Google Play Services.
  • Out of privacy concerns, Google has decided to no longer support this feature.
  • Since AdMob is now part of the Google Play Services, perhaps it integrates with its Location API (i.e. the Fused Location Provider) and automatically supplies location information if available?

第一种选择似乎不太可能,而第二个是可以理解的。不知道第三次,但考虑,不太可能引发的隐私权问题无论是。任何机会,有人可以给这个问题一个定论,或者指向一个可靠的消息来源?

The first option seems unlikely, whereas the second one would be understandable. Not sure about the third, but considering the privacy implications, not too likely either. Any chance someone can give a conclusive answer on the matter, or perhaps point to a reliable source?

请注意:是的,我知道在文档以下句话:

Note: Yes, I'm aware of the following remark in the docs:

为了尊重用户隐私,谷歌要求你只能指定   位置和人口的数据,如果已经使用该信息   你的应用程序。

Out of respect for user privacy, Google asks that you only specify location and demographic data if that information is already used by your app.

该应用程序这一问题提出了对已经位置感知。事实上,它是应用程序的一个比较重要的方面。当音符说,因为用户的位置已经使用该应用,与广告请求供给它一直是有效的情况下,使用迄今

The app this issue came up for is already location-aware. In fact, it's a rather important aspect of the app. As the note says, since the user's location is already used by the app, supplying it with the ad request has been a valid use case so far.

更新

通过对在 1月9日的博客文章即将推出的谷歌播放服务4.1更新,有一个提到的位置打靶正在通过新的API,再介绍:

With the 9 January blog post on the upcoming Google Play Services 4.1 update, there is a mention of location targetting being re-introduced through a new API:

谷歌移动广告
随着谷歌Play业务4.1,谷歌手机广告   SDK现在完全支持DFP广告,DoubleClick广告   Exchange和搜索广告的移动应用程序。 您也可以使用一个新的   发行商提供的定位API,提供谷歌的位置   请求广告时。基于位置的广告可以提高你的应用程序   货币化。

Google Mobile Ads
With Google Play services 4.1, the Google Mobile Ads SDK now fully supports DoubleClick for Publishers, DoubleClick Ad Exchange, and Search Ads for Mobile Apps. You can also use a new publisher-provided location API to provide Google with the location when requesting ads. Location-based ads can improve your app monetization.

<打击>目前我还没有发现这种新的API的任何更新的文档,但希望它变得可用很快 - 只要播放服务4.1已经完成了谷歌的部署。在那之前,我会继续我的最初的回答如下,仅供参考。

谷歌现在已经更新了新的功能,在Android文档。请参阅下面接受的答案。

Google has now updated the Android docs on the new features. See accepted answer below.

推荐答案

最后更新:

谷歌终于更新了Android文档,包括新的发行商提供的定位API。毫不奇怪,这些被粘到建造者模式和pretty的很多相同的东西的工作原理previously:

Google has finally updated the Android docs to include the new publisher-provided location API. Not surprisingly, these are glued into the builder pattern and pretty much identical to how things worked previously:

<一个href="https://developer.android.com/reference/com/google/android/gms/ads/AdRequest.Builder.html#setLocation%28android.location.Location%29"相对=nofollow> AdRequest.Builder.setLocation(位置)

下面的答案保持用于教育目的;如果以上回答了你的问题,就没有必要看得更远任何。

The answer below is kept for educational purposes; if above answered your question, there's no need to look any further.

更新:看样子位置目标定位将通过在谷歌播放服务4.1一个新的API重新启用。详细信息请参见更新原来的问题。

Update: It appears location targetting will be re-enabled through a new API in Google Play Services 4.1. See update to original question for more details.

有关缺乏答案,我打算把这个简要的分析了暂时。我有一个快速浏览一下旧的AdMob的SDK和新的谷歌游戏服务,以试图发现更多的信息。

For a lack of answers, I'm going to put this brief analysis up for the time being. I had a quick look at the old AdMob SDK and the new Google Play Services in an attempt to discover more information.

下面是我的发现至今,在一个小桌子概述。基本上,这给所有发送的各种键 - 值对的比较的 AdRequest

Here are my findings so far, outlined in a small table. Basically this gives a comparison of the various key-value pairs that are sent with an AdRequest.

 Admob SDK:                     | Google Play Services:
--------------------------------|--------------------------------
 map.put("kw", ...);            | map.put("kw", ...);
 map.put("cust_gender", ...);   | map.put("cust_gender", ...);
 map.put("cust_age", ...);      | map.put("cust_age", ...);
 map.put("uule", ...);          |
 map.put("testing", ...);       |
 map.put("pto", ...);           |
 map.put("cipa", ...);          |
 map.put("adtest", ...);        | map.put("adtest", ...);
 map.put("extras", ...);        | map.put("extras", ...);
                                | map.put("tag_for_child_directed_treatment", ...);
--------------------------------|--------------------------------

Legend:
* kw = keyword
* cust_gender = gender
* cust_age = birthday
* uule = location
* testing = testing
* pto / cipa = plus one opt out
* adtest = is test device
* extras = extras

在旧的AdMob的SDK,在 uule 键用于一个位置结合起来。不幸的是,无处在谷歌游戏服务被发现。这表明,在我原来的问题第3的炒作很可能是没有的情况下。在某种程度上,这将是有意义的,因为这是肯定的东西,早就被证明仅仅是因为改变的地方,所需的权限。

In the old AdMob SDK, the uule key is used to bind up a location. Unfortunately, that is nowhere to be found in Google Play Services. That suggests that the 3rd speculation in my original question is most likely no the case. In a way, that would make sense, because that's definitely something that would've been documented somewhere, simply because of the change in required permissions.

我也倾向于说,定位功能不被忽视。这不是唯一缺少的关键,但其他大部分主流的人都在那里,如年龄,性别,关键字等。取而代之,我开始相信,它被排除故意,下降对它的支持。如果我是一个大胆的猜测,那是因为隐私问题最有可能的。

I'm also inclined to say that the location feature wasn't overlooked. It's not the only missing key, but most of the other mainstream ones are there, like age, gender, keyword etc. In stead, I'm starting to believe that it was left out intentionally, dropping support for it. If I were to venture a guess, then it's most likely because of privacy concerns.

如果有人(从谷歌特别是人)可以证实这一点,那简直太好了。另外,如果你发现任何违背这些发现,最绝发表评论。我很高兴能证明是错误的。

If anyone (in particular someone from Google) could confirm this, that'd be great. Also, if you find anything that contradicts these findings, most definitely leave a comment. I'm happy to be proven wrong.

这篇关于如何与AdRequest提供的位置,现在的AdMob已经成为谷歌播放服务的一部分吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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