googleads-consent-sdk-android
googleads-consent-sdk-android copied to clipboard
Consent state resets to UKNOWN after every requestConsentInfoUpdate in 4.4 / KitKat (Samsung N7100)
equals() always returns false:
if (!consentData.getAdProviders().equals(consentData.getConsentedAdProviders()) || hasNonPersonalizedPublisherIdChanged) {
consentData.setConsentStatus(ConsentStatus.UNKNOWN);
consentData.setConsentedAdProviders(new HashSet());
}
Data structure dump from debugger: debug-dump-4.4.txt
@appdeko having trouble reproducing on this my end. Would be be able to provide a test project that reproduces this issue?
Hi,
Issue reproduced just on this old test device - either specific android version or vendor related: Samsung Galaxy Note 2 Android 4.4.
My consent implementation is pretty standard and runs OK on other devices or AVDs (including nexus x86 4.4 AVD). Not sure about providing test project anytime soon: bit busy completing GDPR related tasks.
Found other app on PlayStore - https://play.google.com/store/apps/details?id=com.joxdev.orbia which also fails to check saved consent on my 4.4 device (keep asking on every restart, other devices ok).
Will wait for user feedback with similar sgs3 / note2 devices.
@appdeko are you still experiencing this issue on the latest version of this SDK (v1.0.2) ?
@rampara issue still persist in 1.0.2 on my old 4.4 device. Could be some weird quirk in Samsung's Dalvik implementation, most likely bytecode-related.
@appdeko yes, there seems to be type-erasure happening when it shouldn't. Are you using proguard for your builds ?
@rampara proguard used for release builds only. Tested on both debug and release builds. D8 dexer by default. Tried old DX too, same result.
Is this still a issue in 1.0.7 ?
Got that issue on XIAOMI MI9 Android 9. It's annoying like hell. My app checks consent during onResume(), so each time the activity (or any) is resumed, I get the consent request. What is going on?
onConsentInfoUpdated() is called with STATUS_UNKNOWN, most of the time. Like 9 times out of 10. One get PERSONALIZED, but then next one gets UNKNOWN again.
What can I do to fix this?
Using: implementation 'com.google.android.ads.consent:consent-library:1.0.7'
FWIW, it happens also on Pixel 3 XL, Android Q. One have to store the user answer because this library is unreliable with regards to keeping user consent properly. I receive UNKNOWN and PERSONALIZED intermittently.
Same here. Started to appear quite suddenly in already released apps. Still persists with the latest version of the library. I've been digging into the code of the library and the consent is correctly deserialized from preferences (containing either PERSONALIZED or NON_PERSONALIZED consent and list of 199 ad providers. However when it's compared with latest server list of providers (also 199 providers), it does not match. Therefore the library says the consent is UNKNOWN. I've checked the lists and first free items match (both class, id, name and privacy policy url), however the 4th position is different. Therefore I believe this is something which can be solved on Google's side. Strange thing - I would expect many more people experiencing this, however I see nothing in user reviews in Google Play :/.
Yep, seems to be Admob issue (it's providing the list which is alternating between two versions). More discussion hopefully at forum