/// <summary> /// 程序启动 /// </summary> public void AppLaunch() { DontDestroyOnLoad(gameObject); Application.runInBackground = true; Screen.sleepTimeout = SleepTimeout.NeverSleep; SetResourceLoadType(useCacheWhenLoadResource); //设置资源加载类型 AudioPlayManager.Init(); MemoryManager.Init(); //内存管理初始化 Timer.Init(); //计时器启动 InputManager.Init(); //输入管理器启动 #if !UNITY_WEBGL UIManager.Init(); //UIManager启动 #else UIManager.InitAsync(); //异步加载UIManager #endif ApplicationStatusManager.Init(); //游戏流程状态机初始化 GlobalLogicManager.Init(); //初始化全局逻辑 if (AppMode != AppMode.Release) { GUIConsole.Init(); //运行时Console DevelopReplayManager.OnLunchCallBack += () => { SDKManager.Init(); //初始化SDKManger #if USE_LUA LuaManager.Init(); #endif InitGlobalLogic(); //全局逻辑 ApplicationStatusManager.EnterTestModel(m_Status); //可以从此处进入测试流程 }; DevelopReplayManager.Init(m_quickLunch); //开发者复盘管理器 LanguageManager.Init(); } else { Log.Init(false); //关闭 Debug SDKManager.Init(); //初始化SDKManger #if USE_LUA LuaManager.Init(); #endif InitGlobalLogic(); //全局逻辑 ApplicationStatusManager.EnterStatus(m_Status); //游戏流程状态机,开始第一个状态 LanguageManager.Init(); } if (s_OnApplicationModuleInitEnd != null) { s_OnApplicationModuleInitEnd(); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.CustomSettingsLayout); var textView = FindViewById <TextView>(Resource.Id.custom_setting_text); try { // Below call will return SDKManager instance readily // as it is already initialised as part of Login flow. var sdkmanager = SDKManager.Init(this); textView.Text = sdkmanager.CustomSettings; } catch (AirWatchSDKException e) { textView.Text = "AirwatchSDKException during CustomSettings API call"; } }
public override void OnEnterStatus() { SDKManager.Init(); //SDKManager.LoadAD(ADType.Banner); SDKManager.LoadAD(ADType.Interstitial); FavoritesService.Init(); PoemLibrary.Init(); LanguageManager.Init(); GameOptionService.Init(); SDKManager.Log("LaunchGame", null); m_window = UIManager.OpenUIWindow <HotUpdateWindow>(); HotUpdateManager.StartHotUpdate(ReceviceHotUpdateProgress); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); try { var sdkmanager = SDKManager.Init(this); var deviceId = sdkmanager.DeviceUid; Console.WriteLine($"DeviceId: {deviceId}"); } catch (AirWatchSDKException ex) { var resultCode = ex.ErrorCode; throw; } Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); listView = FindViewById <ListView>(Resource.Id.listview); // Below call returns instanlty as SDKManager is already initialised as part of login flow var sdkmanager = SDKManager.Init(this); listItems.Add(new HeaderItem() { Heading = "Device Information" }); listItems.Add(new ListItem() { Setting = "Device UID", Value = sdkmanager.DeviceUid }); listItems.Add(new ListItem() { Setting = "Compliance Status", Value = sdkmanager.IsCompliant.ToString() }); listItems.Add(new ListItem() { Setting = "Compromised Status", Value = sdkmanager.IsCompromised.ToString() }); listItems.Add(new ListItem() { Setting = "Is Device Enterprise", Value = sdkmanager.IsEnterprise.ToString() }); listItems.Add(new ListItem() { Setting = "Has API Permission/Is Whitelisted", Value = sdkmanager.HasAPIPermission.ToString() }); listItems.Add(new HeaderItem() { Heading = "User Information" }); listItems.Add(new ListItem() { Setting = "Username", Value = sdkmanager.EnrollmentUsername }); listItems.Add(new ListItem() { Setting = "Group ID", Value = sdkmanager.GroupId }); listItems.Add(new ListItem() { Setting = "Emrollment Status", Value = sdkmanager.IsEnrolled.ToString() }); listItems.Add(new HeaderItem() { Heading = "Server Information" }); listItems.Add(new ListItem() { Setting = "Server", Value = sdkmanager.ServerName }); listItems.Add(new ListItem() { Setting = "Console Version", Value = sdkmanager.ConsoleVersion.ToString() }); listItems.Add(new ListItem() { Setting = "Server Port", Value = sdkmanager.ServerPort.ToString() }); listView.Adapter = new InfoAdapter(this, listItems); }
protected override void OnResume() { Task.Run(() => { SDKManager.Init(this); }); }