问题
I'm trying to implement UE consent that lets the user select if he wants personalized ads in Android, using Admob. I'm doing this with "Funding choices", with the user messaging platform.
I followed this quick start guide:
https://developers.google.com/admob/ump/android/quick-start
To simplify, I selected only google in my providers lists.
The problem is, when I simulate a user from the ue, the form shows. But when I choose personalized or non-personalized, the consent status changes to OBTAINED, but the consent type remains in UNKNOWN.
I'm using this versions of admob and ump:
implementation 'com.google.android.gms:play-services-ads:19.3.0'
implementation 'com.google.android.ump:user-messaging-platform:1.0.0'
回答1:
I was facing the same issue, but a Google Engineer pointed me in the right direction. Apparently this is the default behavior if you're using the IAB TCF v2 framework. The consent type is only applicable to the simplified version of the form. The full conversation can be found here Since the Google documentation is lacking information I had to dig a little deeper to find the answer on the IAB Techlab Github.
To find the Consent status of your user all you need is SharedPreferences(Android) OR NSUserDefaults(iOS) the key value pairs and full explanation can be found here
So to solve your problem be sure to check out the In-App Details section:
- An app publisher should embed a CMP SDK – The setup and configuration as well as the protocol for how to initialize the CMP SDK are all proprietary to each CMP SDK. (Google Funding Choices)
- Since more than one CMP SDK may be included in publishers' linked SDKs, the publisher must initialize only one of them. The initialized CMP shall set IABTCF_CmpSdkID with its ID as soon as it is initialized in the app to signal to vendors that a CMP is present.
- The CMP SDK will determine if GDPR applies to this user in this context. But, a publisher may choose to initialize a CMP dialogue UI manually.
- The CMP shall set the NSUserDefaults(iOS) or SharedPreferences(Android) variables and vendors will then be able to read from them directly.
- Vendors should listen to IABTCF_* key updates to retrieve new TC data from NSUserDefaults(iOS) or SharedPreferences(Android).
I hope this answers your question, but if your stuck somewhere please let me know!
来源:https://stackoverflow.com/questions/63415275/obtaining-consent-with-the-user-messaging-platform-android