Bug: getPrivacyOptionsRequirementStatus doesn't really return the most recent value it had on last session

216 views
Skip to first unread message

Liran Barsisa

unread,
Dec 13, 2023, 7:15:30 PM12/13/23
to Google Mobile Ads SDK Developers
implementation "com.google.android.ump:user-messaging-platform:2.1.0"

It says this:
https://developers.google.com/admob/android/privacy/api/reference/com/google/android/ump/ConsentInformation.html#getPrivacyOptionsRequirementStatus()

However, after requestConsentInfoUpdate returns a good value for me that says I should show ad-consent, and later I restart the app and call `UserMessagingPlatform.getConsentInformation(app).privacyOptionsRequirementStatus` , it still says "UNKNOWN".

Please fix this.

Mobile Ads SDK Forum Advisor

unread,
Dec 14, 2023, 3:16:29 AM12/14/23
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran Barsisa,

Thank you for contacting the Mobile Ads SDK Support team.

I will check with our team regarding your query and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.

This message is in relation to case "ref:!00D1U01174p.!5004Q02r1ijj:ref"

Thanks,
 
Google Logo Mobile Ads SDK Team


Liran Barsisa

unread,
Dec 14, 2023, 4:46:28 AM12/14/23
to Google Mobile Ads SDK Developers
Thank you. Can you please also make the call to `UserMessagingPlatform.getConsentInformation(app)` to get a cached result in general, meaning that it will return the last `canRequestAds` result from previous sessions (if it's not expired yet, of course) ? 
According to what I've read, it should return the same value anyway for about 13 months, but sadly isn't managed nicely...
There is no official way to get the cached result of any of these important functions (canRequestAds and getPrivacyOptionsRequirementStatus).

Mobile Ads SDK Forum Advisor

unread,
Dec 14, 2023, 1:32:21 PM12/14/23
to lbl...@gmail.com, google-adm...@googlegroups.com
Hi Liran,

I have made note of your concerns regarding the speed of the API and suggested the use of caching. The engineers will consider the proposal.

Thank You,
Nick

ref:!00D1U01174p.!5004Q02r1ijj:ref

Liran Barsisa

unread,
Dec 14, 2023, 1:58:22 PM12/14/23
to Google Mobile Ads SDK Developers

Thank you.
It could be great. We could also have the ability to query which kinds of ads we are expected to have, as the website talks about 3 types (personalized, limited and non-personalized):
https://support.google.com/admanager/answer/9882911?hl=en#:~:text=The%20following%20ad%20serving%20modes%20will%20be%20available%20for%20publishers%3A

Mobile Ads SDK Forum Advisor

unread,
Dec 14, 2023, 4:27:18 PM12/14/23
to lbl...@gmail.com, google-adm...@googlegroups.com
Hi Liran,

Once `requestConsentInfoUpdate` is called `canRequestAds` can be called immediately and will include the on device status. 

See https://developers.google.com/admob/android/privacy

This is also called out on our get started video https://developers.google.com/admob/android/privacy

Hope this helps,
Nick

ref:!00D1U01174p.!5004Q02r1ijj:ref

Liran Barsisa

unread,
Dec 14, 2023, 4:33:17 PM12/14/23
to Google Mobile Ads SDK Developers
That's irrelevant to what I wrote.
I talked about getPrivacyOptionsRequirementStatus, and the docs say that after the first time that requestConsentInfoUpdate is called, you can get it even on the next sessions.
Read the docs I've pointed to, and quoted ...
It says "defaults to the previous session's value until ...".
Instead, it returns UNKNOWN even though it returned a different value before.

As for "canRequestAds", just as you wrote, this is still requiring the constant call to requestConsentInfoUpdate on each time the app's process has started, and it also requires an Activity even though it shouldn't.

Liran Barsisa

unread,
Dec 18, 2023, 6:33:12 PM12/18/23
to Google Mobile Ads SDK Developers
In any case, both getPrivacyOptionsRequirementStatus and canRequestAds should return the last session's values of requestConsentInfoUpdate and let us know that they are also available.
Currently both always return the same values till we call requestConsentInfoUpdate again.
Please also update the docs to indicate that both use the cached values (after you verify that indeed it is as such). Currently it says so only for getPrivacyOptionsRequirementStatus but not for canRequestAds.
Reply all
Reply to author
Forward
0 new messages