Replies: 5 comments 1 reply
-
But if you know that "0" means that there was no consent given for anything, why return "unclear" ? As for "755", I said this because it was mentioned here, and also on StackOverflow, and there it has a function of "canShowPersonalizedAds" , which seems to be able to detect the difference here, yet as you said I will need to check it better because you said they only check about Admob which has the ID of 755. How can I change your code (or add a new function) to detect that user has chosen "Do not consent" (or close the dialog), then? |
Beta Was this translation helpful? Give feedback.
-
Because I assume but do not know for sure, beyond any doubt, what happens in that scenario. You can just consider
|
Beta Was this translation helpful? Give feedback.
-
But as I said: After showing the dialog (I removed the app before checking), and calling the function when reaching the dialog callback, I get "Unclear", even though I chose "do not consent"... So it does reach the vendors part |
Beta Was this translation helpful? Give feedback.
-
I changed your code only a little bit, by moving parts of the code to where they are used, meaning as such: |
Beta Was this translation helpful? Give feedback.
-
So I guess that if the vendor variable is "0", it's "do not consent". Also, how come you don't check the pref of "IABTCF_VendorLegitimateInterests", as on the StackOverflow answer? |
Beta Was this translation helpful? Give feedback.
-
This is a continuation of the discussion started in #4, with the last question:
The starting point of all of this actually is your own AdMob settings. If you go to the "GDPR settings" in "Privacy & messaging":
you will find a section where you can "Review your ad partners":
Note that in this case, there's only "1 partner", because I customized those settings for myself. It means that my app will only be able to display ads by that single ad partner. If instead I used "Commonly used ad partners", that would be 191 of them. Even adding just the "mediation partners who have been GDPR certified with Google" means that there are 37 of them.
Whatever you define there will make up the list of "vendors" that will be displayed in the UMP dialog of your app.
Now, in the UMP dialog, you can either:
Cases 1 and 2 (and perhaps 4 with clicking "Accept all", unsure about that) are unproblematic, because a user will have given full consent for your app and everything is fine.
However, the problem is that when users just click "Confirm choices" on the secondary screen without selecting any options (case 3), or even if they selected any options but not any vendors on the tertiary screen (case 4, first part), your app will not have sufficient consent to display ads - likely none, but at least not from specific vendors that you wanted to use, or else you wouldn't have selected them in AdMob in the first place.
Now, regarding the string that functionality in here wants you to copy&paste - that is the bit string for vendor consent you gave, so it needs to be copied after you've given full consent by clicking "Consent" or some variant of "Accept all". After full consent, every '1' character corresponds to a vendor that you set up in AdMob before, and every '0' corresponds to a vendor that you did not want to use. I have no say in that, all of it is based purely on your own choices.
Obviously, yes, if you close the UMP dialog and give no consent at all, the vendor bit string will be just a single '0', because it needs to contain no '1' characters in that case.
There is no explicit mention of a "755" in my code, because there's no need for it. That vendor ( which happens to be "Google Advertising Products") just becomes a part of the vendor bit string that you need to put into the function, with a '1' character in position 755 of the string.
For what it is worth, you can disable that check by just using
val goodVendorConfiguration = "0"
- but that obviously means that the code will no longer detect if consent for the necessary vendors is not present, which means that it might return a positive value likeAdConfiguration.PERSONALIZED
if in fact the app will not be able to display any ads. This is not a bug of my code, but the actual core idea of the whole function.Beta Was this translation helpful? Give feedback.
All reactions