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"); } }
partial void InitializeCometChat_TouchUpInside(UIButton sender) { cometchat = new CometChat(); readyUIFile = new readyUIFIle(); User user = Auth.DefaultInstance.CurrentUser; Database database = Database.DefaultInstance; CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) => { }; cometchat.InitializeCometChat(siteurl, licenseKey, apiKey, isCometOnDemand, (dict) => InitSuccess(dict), error => InitFail(error)); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); SugarContext.Init(this); // System.Console.WriteLine(TAG+ "google app id: " + GetString(Resource.String.common_google_play_services_notification_channel_name)); Firebase.FirebaseApp.InitializeApp(this); // Get our button from the layout resource, // and attach an event to it cc = CometChat.GetInstance(this.ApplicationContext); setUpFields(); }
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()); } }); }
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()); } }); }
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); } })); } }