private async void OnAppResume(object sender, Page e)
        {
            var canUseLocationService = await GPSService.CanUseLocationService();

            if (canUseLocationService)
            {
                App.Current.MainPage = new LoginPage();
            }
        }
Пример #2
0
        private async void NavigateToFirstPage()
        {
            var isGpsReady = await GPSService.CanUseLocationService();

            if (isGpsReady)
            {
                MainPage = new LoginPage();
            }
            else
            {
                MainPage = new LocationPermissionPage();
            }
        }
        private async void CheckPermission()
        {
            var canUseLocationService = await GPSService.CanUseLocationService();

            if (canUseLocationService)
            {
                App.Current.MainPage = new LoginPage();
            }
            else
            {
                await GPSService.RequestLocationPermission();

                canUseLocationService = await GPSService.CanUseLocationService();

                if (canUseLocationService)
                {
                    App.Current.MainPage = new LoginPage();
                }
            }
        }