PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

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



Description
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

https://developers.google.com/admob/android/migration

EDIT: Hi. With WM27 (on 10/22/2022) you can use the latest versions of the artifacts without making changes to the code.

com.google.android.ump:user-messaging-platform version 2.0.0, and
com.google.android.gms : play-services-ads version 21.3.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

https://developers.google.com/admob/ump/android/quick-start

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.

Hi. With WM27 (on 10/22/2022) you can use the latest versions of the artifacts without making changes to the code.

com.google.android.ump:user-messaging-platform version 2.0.0, and
com.google.android.gms : play-services-ads version 21.3.0


Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
Rubén Sánchez Peña
Hi. With WM27 (on 10/22/2022) you can use the latest versions of the artifacts without making changes to the code.

com.google.android.ump:user-messaging-platform version 2.0.0, and
com.google.android.gms : play-services-ads version 21.3.0
Rubén Sánchez Peña
Bonjour, avec WM27 (le 22/10/2022) vous pouvez utiliser les dernières versions des artefacts sans modifier le code.

com.google.android.ump:user-messaging-platform version 2.0.0, et
com.google.android.gms : play-services-ads version 21.3.0
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.

Rubén
ABOUT
RATING:
00No rating
DOWNLOADS:
95
UPDATED:
October 22, 2022
VERSION:
1.0.0.0
CONCERNS:
WINDEV Mobile
Minimum version: WM 26
SIZE:
1.2 MB