Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2423] Android: Add non-personalized ads support to "ti.admob"

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-05-25T12:59:51.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.2.0
Componentsn/a
Labelsadmob, android
ReporterJoshua Quick
AssigneeHans Knöchel
Created2018-05-21T22:04:20.000+0000
Updated2018-06-05T22:41:51.000+0000

Description

*Summary:* By default, AdMob provides targeted ads based on user identifiable information. In order to comply with the EU GDPR, we need to be able to provide "non-personalized ads" (aka: "npa") if the end-user has not consented to targeted ads. https://developers.google.com/admob/android/eu-consent *Recommended Solution:* Modify the following AdMob requestAd() to accept a dictionary of properties (method currently does not support arguments). The property we need is extras, which must be a dictionary of strings. The item needed is "npa".
admob.requestAd({
	extras: { npa: '1' }
});
This "extras" dictionary of strings will then be blindly copied to an Android Bundle when requesting an ad, as documented here... https://developers.google.com/admob/android/eu-consent#forward_consent_to_the_google_mobile_ads_sdk The advantage of creating an "extras" dictionary is because it'll then behave the same as "ti.admob" for iOS and there are other documented Google extras that can be used. Also, adding a dictionary of properties to requestAd() leaves room for the possibility to support interstitial ad support in the future.

Comments

  1. Hans Knöchel 2018-05-22

    PR: https://github.com/appcelerator-modules/ti.admob/pull/77
  2. Lokesh Choudhary 2018-06-05

    Closing as PR's are merged & a community member has verified the working.

JSON Source