Skip to content

Commit bb0676d

Browse files
committed
[DIA-2026] Save&Exit button fixed for Android platform
1 parent e051d75 commit bb0676d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Assets/ConsentManagementProvider/Scripts/wrapper/Android/SpClientProxy.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)