public void loginWithUID(string UID, CometChatFormCallback callback)
 {
     cometchat.LoginWithUID("OIKUBJ2CH5180ISTO6Q",
                            (dict) => { if (dict != null && callback != null)
                                        {
                                            callback.SuccessCallback(dict.ToString()); this.isLogin = true;
                                        }
                            },
                            (err) => { if (err != null && callback != null)
                                       {
                                           callback.SuccessCallback(err.ToString());
                                       }
                            });
 }
 public void logout(CometChatFormCallback callback)
 {
     cometchat.Logout(
         (dict) => { if (dict != null && callback != null)
                     {
                         callback.SuccessCallback(dict.ToString()); this.isLogin = false;
                     }
         },
         (err) => { if (err != null && callback != null)
                    {
                        callback.SuccessCallback(err.ToString());
                    }
         });
 }
 public void logout(CometChatFormCallback callback)
 {
     cometchat.Logout(new CometChatCallback((JSONObject obj) =>
     {
         System.Console.Write("Logout success");
         this.isLogin = false;
         if (callback != null)
         {
             callback.SuccessCallback((string)obj);
         }
     }, (JSONObject obj) =>
     {
         System.Console.Write("Logout fail");
         if (callback != null)
         {
             callback.FailCallback((string)obj);
         }
     }));
 }
 public void loginWithUID(string UID, CometChatFormCallback callback)
 {
     cometchat.LoginWithUID(context, UID,
                            new CometChatCallback((JSONObject obj) =>
     {
         System.Console.Write("LoginWithUID success");
         this.isLogin = true;
         if (callback != null)
         {
             callback.SuccessCallback((string)obj);
         }
     }, (JSONObject obj) =>
     {
         System.Console.Write("LoginWithUID fail");
         if (callback != null)
         {
             callback.FailCallback((string)obj);
         }
     }));
 }
Пример #5
0
        public void initializeCometChat(string SiteUrl, string LicenseKey, string ApiKey, bool isCometOnDemand, CometChatFormCallback callback)
        {
            System.Console.WriteLine("initializeCometChat CometChatImplementation");
            cometchat = new CometChat();
            readyUI   = new readyUIFIle();
            User     user     = Auth.DefaultInstance.CurrentUser;
            Database database = Database.DefaultInstance;

            CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
            {
            };
            cometchat.InitializeCometChat(SiteUrl, LicenseKey, ApiKey, isCometOnDemand, (dictionary) => { if (dictionary != null)
                                                                                                          {
                                                                                                              callback.SuccessCallback(dictionary.ToString());
                                                                                                          }
                                          }, (error) => { if (error != null)
                                                          {
                                                              callback.FailCallback(error.ToString());
                                                          }
                                          });
        }
Пример #6
0
 public void loginWithUID(string UID, CometChatFormCallback callback)
 {
     cometchat.LoginWithUID(UID, (dict) => { callback.SuccessCallback(dict.ToString()); }, (err) => { callback.FailCallback(err.ToString()); /* code block */ });
 }
 public void initializeCometChat(string SiteUrl, string LicenseKey, string ApiKey, bool isCometOnDemand, CometChatFormCallback callback)
 {
     if (context != null)
     {
         cometchat = CometChat.GetInstance(context);
         cometchat.InitializeCometChat(SiteUrl, LicenseKey, ApiKey, isCometOnDemand, new CometChatCallback((JSONObject obj) =>
         {
             System.Console.Write("InitializeCometChat success");
             this.isInitializeCometChat = true;
             if (callback != null)
             {
                 callback.SuccessCallback((string)obj);
             }
         }, (JSONObject obj) =>
         {
             System.Console.Write("InitializeCometChat fail");
             if (callback != null)
             {
                 callback.FailCallback((string)obj);
             }
         }));
     }
 }
        public void initializeCometChat(string SiteUrl, string LicenseKey, string ApiKey, bool isCometOnDemand, CometChatFormCallback callback)
        {
            cometchat = new CometChat();
            readyUI   = new readyUIFIle();
            User     user     = Auth.DefaultInstance.CurrentUser;
            Database database = Database.DefaultInstance;

            CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
            {
            };
            cometchat.InitializeCometChat(SiteUrl, LicenseKey, ApiKey, isCometOnDemand,
                                          (dict) => { if (dict != null && callback != null)
                                                      {
                                                          callback.SuccessCallback(dict.ToString());
                                                      }
                                          },
                                          (err) => { if (err != null && callback != null)
                                                     {
                                                         callback.SuccessCallback(err.ToString());
                                                     }
                                          });
        }
Пример #9
0
 public void loginWithUID(string UID, CometChatFormCallback callback)
 {
     cometchat.LoginWithUID(context, UID, new CometChatCallback(success => callback.SuccessCallback((string)success), fail => callback.FailCallback((string)fail)));
 }
Пример #10
0
 public void initializeCometChat(string SiteUrl, string LicenseKey, string ApiKey, bool isCometOnDemand, CometChatFormCallback callback)
 {
     if (context != null)
     {
         cometchat = CometChat.GetInstance(context);
         cometchat.InitializeCometChat(SiteUrl, LicenseKey, ApiKey, isCometOnDemand, new CometChatCallback(success => callback.SuccessCallback((string)success), fail => callback.FailCallback((string)fail)));
     }
     else
     {
         System.Console.Write("Conetext Null");
     }
 }