Exemplo n.º 1
0
 public static void DispatchEvent(ACPExtensionEvent acpExtensionEvent, AdobeExtensionErrorCallback errorCallback)
 {
     if (acpExtensionEvent == null)
     {
         Debug.Log("Unable to perform DispatchEvent, acpExtensionEvent is null");
         return;
     }
                 #if UNITY_ANDROID && !UNITY_EDITOR
     AndroidJavaObject eventObj = ACPHelpers.GetAdobeEventFromACPExtensionEvent(acpExtensionEvent);
     mobileCore.CallStatic <Boolean>("dispatchEvent", eventObj, new ExtensionErrorCallback(errorCallback));
                 #elif UNITY_IPHONE && !UNITY_EDITOR
     if (acpExtensionEvent.eventName == null || acpExtensionEvent.eventType == null || acpExtensionEvent.eventSource == null)
     {
         Debug.Log("Unable to perform DispatchEvent, input params are null");
         return;
     }
     string jsonDataEvent = ACPHelpers.JsonStringFromDictionary(acpExtensionEvent.eventData);
     if (jsonDataEvent == null)
     {
         Debug.Log("Unable to perform DispatchEvent, invalid event data");
         return;
     }
     acp_DispatchEvent(acpExtensionEvent.eventName, acpExtensionEvent.eventType, acpExtensionEvent.eventSource, jsonDataEvent, errorCallback);
                 #endif
 }
Exemplo n.º 2
0
 private static extern void acp_DispatchResponseEvent(string responseEventName,
                                                      string responseEventType,
                                                      string responseEventSource,
                                                      string responseCData,
                                                      string requestEventName,
                                                      string requestEventType,
                                                      string requestEventSource,
                                                      string requestCData,
                                                      AdobeExtensionErrorCallback errorCallback);
Exemplo n.º 3
0
 public static void DispatchResponseEvent(ACPExtensionEvent responseEvent, ACPExtensionEvent requestEvent, AdobeExtensionErrorCallback errorCallback)
 {
     if (responseEvent == null || requestEvent == null)
     {
         Debug.Log("Unable to perform DispatchResponseEvent, responseEvent or requestEvent is null");
         return;
     }
                 #if UNITY_ANDROID && !UNITY_EDITOR
     AndroidJavaObject responseEventObject = ACPHelpers.GetAdobeEventFromACPExtensionEvent(responseEvent);
     AndroidJavaObject requestEventObject  = ACPHelpers.GetAdobeEventFromACPExtensionEvent(requestEvent);
     mobileCore.CallStatic <Boolean>("dispatchResponseEvent", responseEventObject, requestEventObject, new ExtensionErrorCallback(errorCallback));
                 #elif UNITY_IPHONE && !UNITY_EDITOR
     if (responseEvent.eventName == null || responseEvent.eventType == null || responseEvent.eventSource == null || requestEvent.eventName == null || requestEvent.eventType == null || requestEvent.eventSource == null)
     {
         Debug.Log("Unable to perform DispatchResponseEvent, input params are null");
         return;
     }
     string responseJsonDataEvent = ACPHelpers.JsonStringFromDictionary(responseEvent.eventData);
     string requestJsonDataEvent  = ACPHelpers.JsonStringFromDictionary(requestEvent.eventData);
     if (responseJsonDataEvent == null || requestJsonDataEvent == null)
     {
         Debug.Log("Unable to perform DispatchResponseEvent, responseEventData or requestEventData is invalid");
         return;
     }
     acp_DispatchResponseEvent(responseEvent.eventName, responseEvent.eventType, responseEvent.eventSource, responseJsonDataEvent,
                               requestEvent.eventName, requestEvent.eventType, requestEvent.eventSource, requestJsonDataEvent, errorCallback);
                 #endif
 }
Exemplo n.º 4
0
 public ExtensionErrorCallback(AdobeExtensionErrorCallback callback) : base("com.adobe.marketing.mobile.ExtensionErrorCallback")
 {
     redirectedDelegate = callback;
 }
Exemplo n.º 5
0
 private static extern void acp_DispatchEventWithResponseCallback(string eventName,
                                                                  string eventType,
                                                                  string eventSource,
                                                                  string cData,
                                                                  AdobeEventCallback responseCallback,
                                                                  AdobeExtensionErrorCallback errorCallback);
Exemplo n.º 6
0
 private static extern void acp_DispatchEvent(string eventName,
                                              string eventType,
                                              string eventSource,
                                              string cData,
                                              AdobeExtensionErrorCallback errorCallback);