Пример #1
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();
            var status = await Permissions.RequestAsync <Permissions.LocationWhenInUse>();

            Location location1 = null;

            if (status.ToString() == "Denied")
            {
                await Application.Current.MainPage.DisplayAlert("Error", "In order to use this, you need to enable your current location!", "OK");
            }
            if (status.ToString() == "Granted")
            {
                await model.Init();
            }
        }
Пример #2
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();
            await model.Init();

            SetterI();
        }