コード例 #1
0
 public void TriggerConversationClosed(ISwrveConversationCampaign conversationCampaign)
 {
     NativeCommunicationHelper.CallOnUnity(() =>
     {
         if (_unitySDK.GlobalConversationListener != null)
         {
             _unitySDK.GlobalConversationListener.OnDismiss();
         }
     });
 }
コード例 #2
0
    private async void RegisterForPush()
    {
        this.uwpPushURI = storage.Load(WindowsDeviceTokenSave);
        string uri = await SwrveUnityBridge.RegisterForPush(_nativeSDK);

        if (!string.IsNullOrEmpty(uri))
        {
            bool sendDeviceInfo = (this.uwpPushURI != uri);

            if (sendDeviceInfo)
            {
                NativeCommunicationHelper.CallOnUnity(() =>
                {
                    this.uwpPushURI = uri;
                    storage.Save(WindowsDeviceTokenSave, uwpPushURI);
                    if (qaUser != null)
                    {
                        qaUser.UpdateDeviceInfo();
                    }
                    SendDeviceInfo();
                });
            }
        }
    }
コード例 #3
0
 private void showNativeConversation(string conversation)
 {
     NativeCommunicationHelper.CallOnWindows(() => SwrveUnityBridge.ShowConversation(_nativeSDK, conversation));
 }
コード例 #4
0
 public void PushNotificationWasEngaged(string pushId, Dictionary <string, string> payload)
 {
     NativeCommunicationHelper.CallOnUnity(() => _unitySDK.PushNotificationWasEngaged(pushId, payload));
 }
コード例 #5
0
 public void EventInternal(string eventName, Dictionary <string, string> payload)
 {
     NativeCommunicationHelper.CallOnUnity(() => _unitySDK.NamedEventInternal(eventName, payload, false));
 }