It is clear enough from Google docs how to show consent form in an Android app with Google Mobile Ads SDK:
First I call requestConsentInfoUpdate
and then I call loadAndShowConsentFormIfRequired
that shows the consent form if required.
I did not test this code, but as far as I can guess, Google Mobile Ads SDK checks if the user belongs to the region GDPR applies to, shows its own consent form and internally saves a flag indicating if the user agreed (pressed some Allow button in consent form).
But what if I use a 3-rd party SDK, for example Yandex Mobile Ads.
As I can see from their docs (in Russian), they want me to implement my own consent form and if the user agreed they want me to call setUserConsent(true)
function from their SDK, but I can’t figure out what is the logic behind this.
- What if I show a form with a question like “Do you hate Russians?” and if the user answers Yes I call
setUserConsent(true)
? Will it be a right consent form implementation? If no, what are the requirements to my own consent form and should I translate it to all the languages? - How do I determine if the user belongs to the region GDPR applies to if they (Yandex) does not provide a methods for that (or at least I did not find them)?
- And finally, why did not they (Yandex) implement their own consent form and did not provide an interface similar to Google Mobile Ads SDK does (see above)? Or why does not they simply display the consent from provided by Google Mobile Ads SDK?
I tried to ask their support and they promised to answer in a day but have not answered for couple days and I am not sure will they answer at all.
Yandex also has an example on GitHub demonstrating how to show the consent form.
The link to Google docs on GDPR.
Examples of the consent form:
Using Yandex Ad SDK 6.3: https://stackoverflow.com/questions/77826245/could-not-find-com-appnext-sdkads2-7-1-473
Documentation: https://ads.yandex.com/helpcenter/en/dev/android/quick-start-mm
Sample: https://github.com/yandexmobile/yandex-ads-sdk-android/blob/master/YandexMobileAdsExample/build.gradle.kts
GDPR consent form: https://developers.google.com/admob/android/privacy
ConsentRequestParameters example:
https://developers.google.com/admob/android/privacy#force_a_geography