コード例 #1
0
 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());
                                       }
                            });
 }
コード例 #2
0
 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());
                    }
         });
 }
コード例 #3
0
 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);
         }
     }));
 }
コード例 #4
0
 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 */ });
 }
コード例 #7
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((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);
             }
         }));
     }
 }
コード例 #8
0
        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");
     }
 }