Exemple #1
0
        protected override void OnSleep()
        {
            base.OnSleep();

            AppStateContainer.GetInstance().IsAppActive = false;

            try
            {
                var storage = App.Current.Container.Resolve <Services.Storage.IStorageService>();
                storage?.Suspend();
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Database suspension failed.");
            }
        }
Exemple #2
0
        protected override void OnResume()
        {
            base.OnResume();

            AppStateContainer.GetInstance().IsAppActive = true;
        }