public ALConversationProxy createConversation() { ALConversationProxy alConversationProxy = new ALConversationProxy(); alConversationProxy.TopicId = @"laptop01"; alConversationProxy.UserId = @"adarshk"; // Note : Uncomment following two lines to set SMS fallback's format. /* * [alConversationProxy setSenderSMSFormat:@"SENDER SMS FORMAT"]; * [alConversationProxy setReceiverSMSFormat:@"RECEIVER SMS FORMAT"]; */ ALTopicDetail ALTopicDetail = new ALTopicDetail(); ALTopicDetail.Title = @"Mac Book Pro"; ALTopicDetail.Subtitle = @"13' Retina"; ALTopicDetail.Link = @"https://raw.githubusercontent.com/AppLozic/Applozic-iOS-SDK/master/macbookpro.jpg"; ALTopicDetail.Key1 = @"Product ID"; ALTopicDetail.Value1 = @"mac-pro-r-13"; ALTopicDetail.Key2 = @"Price"; ALTopicDetail.Value2 = @"Rs.1,04,999.00"; NSDictionary dict = ALTopicDetail.Dictionary; NSError error = null; NSData TopicData = NSJsonSerialization.Serialize(dict, 0, out error); string resultTopicDetails = new NSString(TopicData, NSStringEncoding.UTF8); Console.WriteLine("ALTopicDetail ### {0} ", resultTopicDetails); alConversationProxy.TopicDetailJson = resultTopicDetails; return(alConversationProxy); }
//launching chat with context base chat. public static void launchContextBasedChat(ALConversationProxy ConversationProxy, UIViewController controller) { ALDefaultChatSettings(); ALConversationService alconversationService = new ALConversationService(); alconversationService.CreateConversation(ConversationProxy, (Error, ConversationProxyFromServer) => { if (Error != null) { Console.WriteLine(" Error launching Conversation ::{0}", Error.Description); } else { //SET Values From server... ConversationProxy.Id = ConversationProxyFromServer.Id; if (ConversationProxyFromServer.GroupId != null) { ConversationProxy.GroupId = ConversationProxyFromServer.GroupId; } ChatLauncher.LaunchIndividualContextChat(ConversationProxy, controller, null, ""); } }); }