Closed KarahanOnarlar closed 1 week ago
Hi @KarahanOnarlar
I was not able to replicate this on Unity 2023 and plugin version 8.7.0.
I changed the hello world sample like this :
And was able to retrieve the IABTCF_PurposeConsents
value:
Hi @NVentimiglia
Are we sure this test for the android platform and not ios because I tested it maybe dozens of times and the results were always empty. There is no problem on iOS side, only Android.
The data is always saved in "packagename_preferences" unless it is passed with a special key in the form of "key/value". If passed as "key/value", the value is saved in sharedPreferences(key).
Let me also send you the screenshot of the shared pref code where the actual values I found by scraping the ump v2.2.0 SDK are set.
This is the code that I detected and reached while watching logcat, thanks to the logs saying that the data was not found. The zzco.zza code I chose is the code in the screenshot above.
@KarahanOnarlar
I just retested this on Unity 2021 and 2023 to rule out a difference in engines.
High level here is my understanding :
UMP SDK runs consent process, writing the TCF string when complete.
Use ApplicationPreferences
to read the newly written TCF string.
I ran the application twice per engine. The first time I consent, the second time I did not consent. In this test I expect that the value I pull from ApplicationPreferences
should change.
When I consented I received back the 111...
string.
When I did not consent I received back 0
.
This is as expected as far as I can see. If ApplicationPreferences
was reading from the wrong location this value should not have changed.
The decompiled code is interesting, but to get this fixed I need clear replication steps.
I will have a colleague take a look at this as well to make sure I am not missing anything.
@NVentimiglia This is really weird because I tried dozens of times with the exact same code contained in ApplicationPreferences and the results were all empty. Otherwise I wouldn't have spent so much time dealing with minified source code.
Although there are things I said before, all I know to reproduce is to build on the android device using ump sdk v2.2.0 and query the tcf string or isGdpr value. It works smoothly on iOS device, but the data is empty on Android.
@KarahanOnarlar
Can you modify the helloworld sample app and link me to the fork / zip ?
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
I don't understand why it is documented this way in the Google documents, but the shared preferences example where the User Messaging Platform SDK writes the data is not PreferenceManager.getDefaultSharedPreferences(activity).
After much effort, I was able to find the real preference example. This needs to be fixed because we need to be able to read our consent statuses in order to set up our own front disclosure panels and comply with GDPR & Apple etc policies. For example, in our case, we are using the pre-Att description panel, so we want ATT ourselves. And we need to apply ATT permission only if the necessary permissions have been granted. Otherwise, Apple rejects the update because another permission is requested even though the user does not give permission.
Since I am currently writing my own plugin, this is not a problem for me, but it is a problem for those who are not aware of it.
Relevant Code:
Here is the correct code. Apart from Unity, this also needs to be fixed in the Google documents for Android.