/// <summary>
        /// Used when the application resumes to reset the back button handling
        /// in JavaScript.
        /// </summary>
        /// <param name="onBackPressed">
        /// The action to take when back is pressed.
        /// </param>
        public void OnResume(Action onBackPressed)
        {
            DispatcherHelpers.Initialize();
            DispatcherHelpers.AssertOnDispatcher();

            _defaultBackButtonHandler = onBackPressed;

            if (_useDeveloperSupport)
            {
                _devSupportManager.IsEnabled = true;
            }

            MoveToResumedLifecycleState(false);
        }
        /// <summary>
        /// Used when the application resumes to reset the back button handling
        /// in JavaScript.
        /// </summary>
        /// <param name="onBackPressed">
        /// The action to take when back is pressed.
        /// </param>
        public void OnResume(Action onBackPressed)
        {
            DispatcherHelpers.Initialize();
            DispatcherHelpers.AssertOnDispatcher();
            ReactChoreographer.Initialize();

            _defaultBackButtonHandler = onBackPressed;
            _suspendCancellation      = new CancellationDisposable();

            if (_useDeveloperSupport)
            {
                _devSupportManager.IsEnabled = true;
            }

            _lifecycleStateMachine.OnResume();
        }