public static PlatformUtil GetInstance() { if (PlatformUtil.instance == null) { PlatformUtil.instance = new PlatformUtilAndroid(); } return(PlatformUtil.instance); }
public void HandleUnzipResult(string msg) { string obj = this.ParseMsgFromPlatform(msg)["result"]; if (PlatformUtil.GetInstance().unzipFileCallback != null) { PlatformUtil.GetInstance().unzipFileCallback(obj); } }
public void HandleOpenWebView(string msg) { Util.Log("打开WebView,接收到平台发送过来的消息 : " + msg); if (PlatformUtil.GetInstance().openWebViewCallback != null) { string value = this.ParseMsgFromPlatform(msg)["success"]; PlatformUtil.GetInstance().openWebViewCallback(bool.Parse(value)); } }
public void HandleClickDeviceTips(string msg) { string text = this.ParseMsgFromPlatform(msg)["result"]; if (PlatformUtil.GetInstance().clickDeviceTipsCallback != null) { PlatformUtil.GetInstance().clickDeviceTipsCallback(text.Equals("1")); } }
public void HandleSdkLogin(string msg) { Util.Log("sdk登录,接收到平台发送过来的消息 : " + msg); Dictionary <string, string> dictionary = this.ParseMsgFromPlatform(msg); if (dictionary.ContainsKey("viewName")) { PlatformUtil.GetInstance().SendLoginResult(dictionary["viewName"]); } else { LuaHelper.GetDeviceDrainModel().RecordSDKLoginResult(this.ParseMsgFromPlatform(msg)); PlatformUtil.GetInstance().SendLoginResult(msg); } }
public void HandleExitApp(string msg) { Util.Log("接收平台返回的退出游戏事件 : " + msg); LuaHelper.GetNetManager().Disconnect(); PlatformUtil.GetInstance().ExitApp(); }
public void HandleSdkSwitchAccount(string msg) { Util.Log("sdk切换帐号,接收到平台发送过来的消息 : " + msg); PlatformUtil.GetInstance().SendSwitchAccountResult(); }
public void HandleSdkLogout(string msg) { Util.Log("sdk登出,接收到平台发送过来的消息 : " + msg); PlatformUtil.GetInstance().SendLogoutResult(); }
public void HandleBatteryChanged(string msg) { Util.Log("接收到平台发送过来的电量信息 : " + msg); PlatformUtil.GetInstance().SendBatteryLowerEvent(); }