コード例 #1
0
        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();
            }
        }
コード例 #3
0
        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();
                }
            }
        }