public void Init() { var sdkappid = PlayerPrefs.GetString("Sdkappid", ""); SdkConfig sdkConfig = new SdkConfig(); sdkConfig.sdk_config_config_file_path = Application.persistentDataPath + "/TIM-Config"; sdkConfig.sdk_config_log_file_path = Application.persistentDataPath + "/TIM-Log"; if (sdkappid == "") { Toast.Show("Input sdkappid first"); return; } TIMResult res = TencentIMSDK.Init(long.Parse(sdkappid), sdkConfig); Result.text = Utils.SynchronizeResult(res); }
public static void Init() { SdkConfig sdkConfig = new SdkConfig(); sdkConfig.sdk_config_config_file_path = Application.persistentDataPath + "/TIM-Config"; sdkConfig.sdk_config_log_file_path = Application.persistentDataPath + "/TIM-Log"; if (sdkappid == "") { addStringDataToConsole("input a sdkappid first"); return; } TIMResult res = TencentIMSDK.Init(long.Parse(sdkappid), sdkConfig); addDataToConsole(res); AddListeners(); }