示例#1
0
        void onAction(AndroidJavaObject view, AndroidJavaObject actionType)
        {
            CONSENT_ACTION_TYPE unwrappedType = (CONSENT_ACTION_TYPE)actionType.Call <int>("getCode");

            CmpDebugUtil.Log("I've reached the C# onAction: " + unwrappedType);
            ConsentMessenger.Broadcast <IOnConsentAction>(unwrappedType);
        }
示例#2
0
        public static void Broadcast <T>(params object[] list) where T : IConsentEventHandler
        {
            CmpDebugUtil.LogWarning("T == " + typeof(T).Name);
            switch (typeof(T).Name)
            {
            case nameof(IOnConsentReady):
                SpConsents consents = (SpConsents)list[0];
                BroadcastEventDispatcher.Execute <IOnConsentReady>(null, (i, d) => i.OnConsentReady(consents));
                break;

            case nameof(IOnConsentAction):
                CONSENT_ACTION_TYPE actionType = (CONSENT_ACTION_TYPE)list[0];
                BroadcastEventDispatcher.Execute <IOnConsentAction>(null, (i, d) => i.OnConsentAction(actionType));
                break;

            case nameof(IOnConsentError):
                Exception exception = (Exception)list[0];
                BroadcastEventDispatcher.Execute <IOnConsentError>(null, (i, d) => i.OnConsentError(exception));
                break;

            case nameof(IOnConsentUIReady):
                BroadcastEventDispatcher.Execute <IOnConsentUIReady>(null, (i, d) => i.OnConsentUIReady());
                break;

            case nameof(IOnConsentUIFinished):
                BroadcastEventDispatcher.Execute <IOnConsentUIFinished>(null, (i, d) => i.OnConsentUIFinished());
                break;
            }
        }
        void OnConsentAction(string message)
        {
            CmpDebugUtil.Log("OnConsentAction IOS_CALLBACK_RECEIVED: " + message);
            CONSENT_ACTION_TYPE actionType = (CONSENT_ACTION_TYPE)Convert.ToInt32(message);

            ConsentMessenger.Broadcast <IOnConsentAction>(actionType);
        }
示例#4
0
 public void OnConsentAction(CONSENT_ACTION_TYPE action)
 {
     Debug.LogWarning($"User made {action} action with consent view!");
 }