---
# System prepended metadata

title: Untitled

---

1. Apka PRIMSA posiada Consent Tool Java Scirpt od One Trust uruchamiany w WebView.
2. Biblioteka "psudonym" prawdopodobnie wymaga natywnej implementacji consenta.
3. Biblioteka  consent znajdujaca sie w Webview zapisuje consent string do ciastka. Aplikacja prisma pobiera ciastko z WebView. Nastepnie zapisuje go w SharedPreferences. Przykład z Androida:
```java
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(AppBase.getAppContext());
SharedPreferences.Editor editor = prefs.edit();
editor.putString("IABTCF_TCString", "CPhHOqtPhHOqtAcABBENClCsAP_AAH_AAChQIbtf_X__b2_j-_5_f_t0eY1P9_7_v-0zjhfdl-8N2f_X_L8X52M7vF36pq4KuR4ku3LBIQVlHOHcTUmw6okVryPsbk2cr7NKJ7PEmnMbOydYGH9_n13T-ZKY7___f_7z_v-v___3____7-3f3__p___--_e_V_99zfn9__3-AAACAAAAAAAB_3ghqASYatxAF2ZY4M20YRQIgRhWEh0AoAKKAYWiAwgZXBTsrgJ9YQIAEAoAnAiBDgCjBgEAAAkASERASBHggEABEAgABAAqEQgAI2AQWAFgYBAAKAaFiBFAEIEhBkQERSmBAVIkFBvZUIJQf6GmEIdZYAUCj_ioQEayBisCISAAAAAAAAAAAAGYIAYIACARgUABABCSAAgEHAAA.f_gAD_gAAAAA");
editor.putInt("IABTCF_PolicyVersion", 2);
editor.apply();
```
4. Logi biblioteki "pseudonym" sugerują, że TCString jest poprawny.
```
2022-10-19 13:10:21.997 27047-27111/de.prisma.app D/INFOnline: Automatic processing of TCF data has been enabled.
2022-10-19 13:10:21.997 27047-27111/de.prisma.app D/INFOnline: TCF2.0 consent data changed, updating IO TCF consent.
2022-10-19 13:10:22.000 27047-27111/de.prisma.app I/INFOnline: Automatic consent generation: TCString: CPhHOqtPhHOqtAcABBENClCsAP_AAH_AAChQIbtf_X__b2_j-_5_f_t0eY1P9_7_v-0zjhfdl-8N2f_X_L8X52M7vF36pq4KuR4ku3LBIQVlHOHcTUmw6okVryPsbk2cr7NKJ7PEmnMbOydYGH9_n13T-ZKY7___f_7z_v-v___3____7-3f3__p___--_e_V_99zfn9__3-AAACAAAAAAAB_3ghqASYatxAF2ZY4M20YRQIgRhWEh0AoAKKAYWiAwgZXBTsrgJ9YQIAEAoAnAiBDgCjBgEAAAkASERASBHggEABEAgABAAqEQgAI2AQWAFgYBAAKAaFiBFAEIEhBkQERSmBAVIkFBvZUIJQf6GmEIdZYAUCj_ioQEayBisCISAAAAAAAAAAAAGYIAYIACARgUABABCSAAgEHAAA.f_gAD_gAAAAA => IO TCF consent: 0100000000
```
5. Wywołujemy przykładowe eventy. Logi:
```
2022-10-19 13:10:22.443 27047-27111/de.prisma.app I/INFOnline: <SZM> Event logged: {"identifier":"application","state":"start","timestamp":1666177822.426,"network":2,"consent":"0100000000","autoConsentState":0}
2022-10-19 13:12:18.238 27047-27111/de.prisma.app I/INFOnline: <SZM> Event logged: {"identifier":"view","state":"appeared","timestamp":1666177938.226,"network":2,"consent":"0100000000","autoConsentState":0,"category":"Start","comment":"\/apimobile"}
2022-10-19 13:13:06.340 27047-27111/de.prisma.app I/INFOnline: <SZM> Event logged: {"identifier":"view","state":"appeared","timestamp":1666177986.338,"network":2,"consent":"0100000000","autoConsentState":0,"category":"Content","comment":"\/apimobile\/tv-programm\/programm-nach-sendern\/"}

```
6. Podczas póby wysłania eventów biblioteka zgłasza błąd niezgodności z consentem. 
```
2022-10-19 13:14:06.655 27047-27111/de.prisma.app V/INFOnline: Age filtering 4 events.
2022-10-19 13:14:06.656 27047-27111/de.prisma.app V/INFOnline: No events removed. All events were created in the last 86400 seconds.
2022-10-19 13:14:06.656 27047-27111/de.prisma.app I/INFOnline: Consent filtering 4 events.
2022-10-19 13:14:06.657 27047-27111/de.prisma.app I/INFOnline: All 4 events enqueued for dispatching did not pass the consent validation and will be deleted.
2022-10-19 13:14:06.659 27047-27111/de.prisma.app D/INFOnline: Add 4 dropped events
2022-10-19 13:14:06.662 27047-27111/de.prisma.app I/INFOnline: <SZM> Sending events aborted! Reason: no events to send!
```




### DO TICKETA

1. PRISMA APP has JavaScript Consent Tool (by One Trust) implement and run inside WebView.
2. The Consent Tool located inside Webview create cookie "eupubconsent-v2" with TC string.
3. It looks like the pseudonym library (we using infonlinelib_2.3.2.aar) needs native implement of consent tool. Is it true? 
4. Currently PRISMA APP itself fetching "eupubconsent-v2" cookie from the WebView and then saves it in SharedPreferences. 
Android exammple:
```java
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(AppBase.getAppContext());
SharedPreferences.Editor editor = prefs.edit();
editor.putString("IABTCF_TCString", "CPhHOqtPhHOqtAcABBENClCsAP_AAH_AAChQIbtf_X__b2_j-_5_f_t0eY1P9_7_v-0zjhfdl-8N2f_X_L8X52M7vF36pq4KuR4ku3LBIQVlHOHcTUmw6okVryPsbk2cr7NKJ7PEmnMbOydYGH9_n13T-ZKY7___f_7z_v-v___3____7-3f3__p___--_e_V_99zfn9__3-AAACAAAAAAAB_3ghqASYatxAF2ZY4M20YRQIgRhWEh0AoAKKAYWiAwgZXBTsrgJ9YQIAEAoAnAiBDgCjBgEAAAkASERASBHggEABEAgABAAqEQgAI2AQWAFgYBAAKAaFiBFAEIEhBkQERSmBAVIkFBvZUIJQf6GmEIdZYAUCj_ioQEayBisCISAAAAAAAAAAAAGYIAYIACARgUABABCSAAgEHAAA.f_gAD_gAAAAA");
editor.putInt("IABTCF_PolicyVersion", 2);
editor.apply();
```
4. The pseudonym library logs suggest that TCString is correct.
```log
2022-10-19 13:10:21.997 27047-27111/de.prisma.app D/INFOnline: Automatic processing of TCF data has been enabled.
2022-10-19 13:10:21.997 27047-27111/de.prisma.app D/INFOnline: TCF2.0 consent data changed, updating IO TCF consent.
2022-10-19 13:10:22.000 27047-27111/de.prisma.app I/INFOnline: Automatic consent generation: TCString: CPhHOqtPhHOqtAcABBENClCsAP_AAH_AAChQIbtf_X__b2_j-_5_f_t0eY1P9_7_v-0zjhfdl-8N2f_X_L8X52M7vF36pq4KuR4ku3LBIQVlHOHcTUmw6okVryPsbk2cr7NKJ7PEmnMbOydYGH9_n13T-ZKY7___f_7z_v-v___3____7-3f3__p___--_e_V_99zfn9__3-AAACAAAAAAAB_3ghqASYatxAF2ZY4M20YRQIgRhWEh0AoAKKAYWiAwgZXBTsrgJ9YQIAEAoAnAiBDgCjBgEAAAkASERASBHggEABEAgABAAqEQgAI2AQWAFgYBAAKAaFiBFAEIEhBkQERSmBAVIkFBvZUIJQf6GmEIdZYAUCj_ioQEayBisCISAAAAAAAAAAAAGYIAYIACARgUABABCSAAgEHAAA.f_gAD_gAAAAA => IO TCF consent: 0100000000
```
5. Then we call sample events.
```log
2022-10-19 13:10:22.443 27047-27111/de.prisma.app I/INFOnline: <SZM> Event logged: {"identifier":"application","state":"start","timestamp":1666177822.426,"network":2,"consent":"0100000000","autoConsentState":0}
2022-10-19 13:12:18.238 27047-27111/de.prisma.app I/INFOnline: <SZM> Event logged: {"identifier":"view","state":"appeared","timestamp":1666177938.226,"network":2,"consent":"0100000000","autoConsentState":0,"category":"Start","comment":"\/apimobile"}
2022-10-19 13:13:06.340 27047-27111/de.prisma.app I/INFOnline: <SZM> Event logged: {"identifier":"view","state":"appeared","timestamp":1666177986.338,"network":2,"consent":"0100000000","autoConsentState":0,"category":"Content","comment":"\/apimobile\/tv-programm\/programm-nach-sendern\/"}

```
6. While dispatching events, library reporting the consent validation errors. 
```log
2022-10-19 13:14:06.655 27047-27111/de.prisma.app V/INFOnline: Age filtering 4 events.
2022-10-19 13:14:06.656 27047-27111/de.prisma.app V/INFOnline: No events removed. All events were created in the last 86400 seconds.
2022-10-19 13:14:06.656 27047-27111/de.prisma.app I/INFOnline: Consent filtering 4 events.
2022-10-19 13:14:06.657 27047-27111/de.prisma.app I/INFOnline: All 4 events enqueued for dispatching did not pass the consent validation and will be deleted.
2022-10-19 13:14:06.659 27047-27111/de.prisma.app D/INFOnline: Add 4 dropped events
2022-10-19 13:14:06.662 27047-27111/de.prisma.app I/INFOnline: <SZM> Sending events aborted! Reason: no events to send!
```