示例#1
0
        async Task CheckPermissions()
        {
            var status = await _centralManager.RequestAccess();

            if (status == AccessState.Denied)
            {
                await App.Current.MainPage.DisplayAlert("Permissions", "You need to have your bluetooth ON to use this app", "Ok");

                Xamarin.Essentials.AppInfo.ShowSettingsUI();
            }
            else
            {
                SetAdapterCommand.Execute(null);
            }
        }