InteractiveAdvertisingBureau / GDPR-Transparency-and-Consent-Framework

Technical specifications for IAB Europe Transparency and Consent Framework that will help the digital advertising industry interpret and comply with EU rules on data protection and privacy - notably the General Data Protection Regulation (GDPR) that comes into effect on May 25, 2018.
855 stars 359 forks source link

Is the Android IABTCF_gdprApplies shared preference key an Integer or a boolean? #340

Closed ericleich closed 9 months ago

ericleich commented 1 year ago

https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details mentions that IABTCF_gdprApplies is a number:

Number:
1 GDPR applies in current context

0 - GDPR does not apply in current context

Unset - undetermined (default before initialization)

see the section "What does the gdprApplies value mean?" for more

However, the link to What does the gdprApplies value mean? describes the value as a boolean.

On Android, when writing to SharedPreferences.Editor, there are separate methods to write an integer vs long vs boolean so this distinction is important.

For app details, and Android in particular, should CMPs be setting an Integer for this value? If so, can the documentation be made clearer on the Android specification to avoid any doubt?

HeinzBaumann commented 10 months ago

I agree, there is an inconsistency in the spec. gdprApplies is a boolean, we should mark it as such under IABTCF_gdprApplies. Let me review this with the FSWG.

HeinzBaumann commented 9 months ago

We have reviewed this issue in the Framework Signal Working Group. For mobile all booleans are written as integers. I make a note in the spec regarding this.

ericleich commented 9 months ago

Thank you!

For posterity, this is the clarifying line I see in the spec:

The TC data values can be retrieved from the application Shared Preferences by key name using the get methods on the android.content.SharedPreferences class. For the purposes of accessing TC data, only two methods should be necessary: getString(String key, String defValue) for String values and getInt(String key, int defValue) for integers and integer representations of Boolean values.