public static void ShowConversation(ISwrveCommon sdk, object conversationJson)
        {
            if (conversationJson is string)
            {
                conversationJson = JsonObject.Parse((string)conversationJson);
            }
            else if (!(conversationJson is JsonObject))
            {
                SwrveLog.e(string.Format("Unable to handle object of type {0} for ShowConversation", (conversationJson == null ? "null" : "" + conversationJson.GetType())));
                return;
            }

            string os = AnalyticsInfo.VersionInfo.DeviceFamily.ToLower();
            SwrveConversationUI conversationUI = new SwrveConversationUI(sdk, os.Contains("desktop"));

            SwrveConversation conversation = new SwrveConversation(new SwrveConversationCampaign(), (JsonObject)conversationJson);

#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
            conversationUI.PresentConversation(sdk, conversation);
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
        }
Пример #2
0
 public override IEnumerator ShowConversationForEvent(string eventName, SwrveConversation conversation)
 {
     yield return(null);
 }