File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Assets/ConsentManagementProvider/Scripts/wrapper/Android Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,23 @@ void onUIFinished(AndroidJavaObject view)
3131 ConsentMessenger . Broadcast < IOnConsentUIFinished > ( ) ;
3232 }
3333
34- void onAction ( AndroidJavaObject view , AndroidJavaObject actionType )
34+ AndroidJavaObject onAction ( AndroidJavaObject view , AndroidJavaObject actionType )
3535 {
36+ CmpDebugUtil . Log ( "I've reached the C# onAction!" ) ;
37+
38+ CmpDebugUtil . Log ( "Trying to unwrap ActionType... " ) ;
3639 AndroidJavaObject wrapper = actionType . Call < AndroidJavaObject > ( "getActionType" ) ;
3740 CONSENT_ACTION_TYPE unwrappedType = ( CONSENT_ACTION_TYPE ) wrapper . Call < int > ( "getCode" ) ;
38- CmpDebugUtil . Log ( "I've reached the C# onAction: " + unwrappedType ) ;
41+ CmpDebugUtil . Log ( "Unwrapped ActionType is: " + unwrappedType ) ;
42+
43+ CmpDebugUtil . Log ( "Trying to put \" pb_key\" , \" pb_value\" in pubData" ) ;
44+ AndroidJavaObject pubData = actionType . Call < AndroidJavaObject > ( "getPubData" ) ;
45+ pubData . Call < AndroidJavaObject > ( "put" , "pb_key" , "pb_value" ) ;
46+ CmpDebugUtil . Log ( "PUT IS SUCCESSFUL" ) ;
47+
3948 ConsentMessenger . Broadcast < IOnConsentAction > ( unwrappedType ) ;
49+ CmpDebugUtil . Log ( "Now I'll return actionType back to Java..." ) ;
50+ return actionType ;
4051 }
4152
4253 void onConsentReady ( string spConsents )
You can’t perform that action at this time.
0 commit comments