protected override void OnStart()
        {
            //Remember, there is always a semi-colon at the end of each!
            AppCenter.Start("ios={Your iOS App secret here};" +
                            "uwp={Your UWP App secret here};" +
                            "android={Your Droid App secret here};",
                            typeof(Analytics), typeof(Crashes));

            IAppState AppState = DependencyService.Get <IAppState>();

            AppState.Init();

            //initialize the log levels for the app and for what messages are sent to the console
#if DEBUG
            //this will dictate the AppCenter logs sent to the console
            AppState.SetAppCenterConsoleLogLevel(LogLevel.Verbose);
            //this will dictate what log level we will send to AppCenter
            AppState.SetAppLogLevel(AppLogLevel.Verbose);
#else
            //this will dictate the AppCenter logs sent to the console
            AppState.SetAppCenterConsoleLogLevel(LogLevel.Warn);
            //this will dictate what log level we will send to AppCenter
            AppState.SetAppLogLevel(AppLogLevel.Info);
#endif
        }
示例#2
0
        /// <summary>
        /// Opens a new state. Opening procedure is finished by calling SetTransitionInFinished.
        /// </summary>
        /// <param name="state">State to be opened.</param>
        protected virtual void StartState(IAppState state)
        {
            _currentState = state;
            _currentState.Init(this);

            _currentTransition = TransitionType.TransitionIn;

            state.TransitionIn();
        }
示例#3
0
        public void Init(Fsm fsm)
        {
            Screen = new T();
            Injector.InjectInto(Screen);

            state.SetScreen(Screen);
            state.Init(this);

            ParentFsm = fsm;
        }