Home |  | Sign in | English US
"User Messaging Platform" Admob sample WM25
Published by Rubén Sánchez Peña
in the category Communication
New features


The example version for WM25 does not allow the use of adaptive banners as its maximum SDK is 29 and adaptive banners are only available from 30. This version only allows normal banners. Use the version of https://depot.PC SOFT.fr/resource.awp?file_id=281474976711135;user-messaging-platform-exemple-admob with WM26.

Hi. There are several important new developments by Google in the presentation of advertising to app users.

a) Google has released a new version of its libraries for displaying ads in applications and has discontinued the previous one, preventing it from being used in new versions uploaded to Google Play.

com.google.android.gms play-services-ads 20.1.0


In the previous example of the implementation of ads in WM, version 19.x.x of these libraries was used. The new version is 20.x.x.x and requires multiple modifications to the functions used. This new version does not work with the default WM26 Gradle (com.android.tools.build:gradle:3.5.0) as there are important modifications in the fields that can appear in the manifest of the application, and when trying to use this library an error is returned.

The solution is to use a version updated by Google for this purpose and compatible with that version, com.android.tools.build:gradle:3.5.4, for which you simply have to edit the WDJava.build file in the Programs folder and rename the version to be used. According to my tests, everything will work perfectly with WM26 after this change.

b) In addition, Google has introduced a new method for displaying the consent form to the user. The old version used the libraries

com.google.android.ads.consent consent-library 1.0.8

These libraries basically did the job, but it was complicated to use multiple languages in the user messages, so in the end many of us opted for our own form with fewer options than Google provided.

The new method uses the

com.google.android.ump user-messaging-platform 1.0.0


and allows you to choose the languages in which you want to display the same, as well as consult who are the publishers of the ads so that the user can select those that will be allowed, and those that will not. The library is compatible with IAB Europe (iab.europe) https://iabeurope.eu/iab-europe-transparency-consent-framework-policies/ and manages all the information that this entity requires for the user's consent. Once the user manages their consent on the device, this information is stored on the device for later use by applications.

Consent form settings

The consent forms in this version can be set in multiple languages if necessary and can be customised in terms of appearance and colours. To do so, access the "Funding Choices" option in AdMob under the "Privacy and messages" menu option. You can define multiple combinations and use them when necessary depending on your needs. The configured options will be the ones shown to users to request their consent.
Illustrations, screen shots
User reviews
(To evaluate this resource, click 'Write a review')
Rubén Sánchez Peña
Bonjour, Google a mis à jour les bibliothèques utilisées par l'exemple.

com.google.android.ump:user-messaging-platform passe de la version 1.0.0 à 2.0.0, et

com.google.android.gms: play-services-ads passe de la version 20.1.0 à 20.2.0.

Avec le changement de version, l'accès à l'import com.google.android.ump.ConsentInformation.ConsentType n'est plus disponible, il y a donc une erreur de compilation. La solution est de supprimer cet import du code dans la procédure "Inicializa" et de supprimer ou commenter la procédure "ConsentimientoTipo".

De cette façon, tout fonctionne à nouveau.

00No rating
June 19, 2021
Minimum version: WM 25
1.8 MB