• Home
  • Documentation
Show / Hide Table of Contents
  • Introduction
  • Commands
    • Commanding
    • Composite Commands
    • Async Commands
    • Error Handling
  • Dependency Injection
    • Getting Started
    • Registering Types
    • Microsoft Extensions (Supplement)
    • Platform Specific Services
    • Exception Handling
    • ContainerLocator
    • Appendix
  • Dialog Service
    • Dialog Service
    • IDialogAware ViewModels
    • IDialogWindow (WPF & Uno Platform)
  • Event Aggregator
  • Mvvm
    • BindableBase
    • ViewModelLocator
  • Modularity
    • Getting Started
    • Module Catalog
    • Module Initialization
  • Navigation
    • Getting Started
    • INavigationParameters
    • Page Navigation
    • Regions
      • Getting Started
      • Region Manager
      • Region Adapters
      • Region Behaviors
      • About Navigation in Prism
      • Basic Region Navigation
      • View/ViewModel Participation
      • Navigating to Existing Views
      • Passing Parameters
      • Confirming Navigation
      • Controlling View Lifetime
      • Navigation Journal
  • Platforms
    • Maui
      • Getting Started
      • Migrating from Prism.Forms
      • PrismAppBuilder
      • AppModel
        • IPageLifecycleAware
      • Behaviors
        • Introduction
        • BehaviorBase<T>
        • EventToCommandBehavior
        • PageBehaviorFactory
      • Dialogs
        • Getting Started
        • IPageDialogService
      • Navigation
        • Introduction
        • Page Navigation
        • NavigationBuilder
        • TabbedPages
        • Understanding the INavigationResult
        • NavigationExceptions
        • Global Navigation Observer
        • XAML Navigation
    • Uno Platform
      • Getting Started
      • Uno.Extensions
    • Wpf
      • Introduction
      • Getting Started
      • View Composition
      • Interactivity
        • Event To Command
    • Xamarin.Forms
      • Create Your First App
      • Behaviors
        • Working with Behaviors
        • EventToCommand Behavior
        • PageBehaviorFactory
      • Dialogs
        • Dialogs
        • Page Dialog Service
        • Dialog Service
        • Styling Dialogs
      • Navigation
        • Navigation Basics
        • Passing Parameters
        • Confirming Navigation
        • Deep Linking
        • Working w/ MasterDetailPages
        • Working w/ NavigationPages
        • Working w/ TabbedPages
        • XAML Navigation
      • Application Lifecycle
      • Page Lifecycle
      • Additional Platforms
        • GTK
  • Magician
    • Getting Started
  • Plugins
    • Essentials
      • Getting Started
      • ApplicationModel
        • App Context
        • Browser
        • Communication
          • Email
          • Phone Dialer
        • Data Transfer
          • Clipboard
          • Share
        • LatestVersion
        • Launcher
        • Version Tracking
      • Devices
        • Battery
        • Sensors
          • Biometrics
          • Geocoding
          • Geofencing
          • Geolocation
      • IO
        • File System
        • Stores
      • Media
        • Getting Started
        • Camera
        • Video
      • Networking
        • Connectivity
      • Notifications
        • Getting Started
        • ActionSheets
        • Alerts
        • Prompts
      • Permissions
        • Permissions Manager
      • Threading
        • Main Thread
    • Logging
      • Getting Started
      • Interop
        • Essentials
        • Microsoft Extensions
      • Providers
        • AppCenter
        • Console
        • Debug
        • Firebase
        • Graylog
        • Kochava
        • Raygun
        • Sentry
        • Unit Testing
        • Xunit
    • Observable Regions
    • Popups
  • Pipelines
    • Commercial Plus

App Permissions

The Permissions API in Prism.Plugin.Essentials allows you to request and check permissions across Android, iOS, MacCatalyst and WinUI on both .NET MAUI and Uno Platform. As with other API's in Prism.Essentials this is automatically registered when Registering Prism Essentials.

Getting Started

To use the Permissions Manager you can inject the IPermissionsManager into your services or ViewModels.

public class MyViewModel(IPermissionsManager permissions) : BindableBase
{
}

To check the state of a given permission you simply need to pass the permission type to the Permission Manager's Check or Request method like:

var status = await permissions.CheckStatusAsync<LocationAlways>();

if (status != PermissionStatus.NotSupported && status != PermissionStatus.Granted)
{
    status = await permissions.RequestAsync<LocationAlways>();
}

A permission status of NotSupported may be returned when the underlying platform does not require authorization for a specific permission.

Supported Permissions

Permission Android iOS MacCatalyst WinUI
Battery Supported Not Supported Not Supported Not Supported
Bluetooth Supported Not Supported Not Supported Not Supported
CalendarRead Supported Supported Supported Not Supported
CalendarWrite Supported Supported Supported Not Supported
Camera Supported Supported Supported Not Supported
ContactsRead Supported Supported Supported Supported
ContactsWrite Supported Supported Supported Supported
Flashlight Supported Not Supported Not Supported Not Supported
LaunchApp Not Supported Not Supported Not Supported Not Supported
LocationAlways Supported Supported Supported Supported
LocationWhenInUse Supported Supported Supported Supported
Maps Not Supported Not Supported Not Supported Not Supported
Media Not Supported Supported Supported Not Supported
Microphone Supported Supported Supported Not Supported
NearbyWifiDevices Supported Not Supported Not Supported Not Supported
NetworkState Supported Not Supported Not Supported Not Supported
Phone Supported Not Supported Not Supported Not Supported
Photos Not Supported Supported Supported Not Supported
PhotosAddOnly Not Supported Supported Supported Not Supported
PostNotifications Supported Not Supported Not Supported Not Supported
Reminders Not Supported Supported Supported Not Supported
Sensors Supported Supported Supported Supported
Sms Supported Not Supported Not Supported Not Supported
Speech Supported Supported Supported Not Supported
StorageRead Supported Not Supported Not Supported Not Supported
StorageWrite Supported Not Supported Not Supported Not Supported
Vibrate Supported Not Supported Not Supported Not Supported
  • Edit on GitHub
  • Ask questions
  • Follow @PrismLib
  • Follow @BrianLagunas
  • Follow @DanJSiegel
Back to top Copyright 2015-2024 Prism Software, LLC