[Enhancement] Push notifications permission
Summary
Add the possibility to check push notifications permission.
API Changes
var status = await Permissions.CheckStatusAsync<Permissions.PushNotifications>();
Of course, you cannot request push notifications permission from the app (enabling/disabling push notifications can be only done from settings), so this will be just read-only permission. Thus you cannot write this:
var status = await Permissions.RequestAsync<Permissions.PushNotifications>();
This should throw an exception.
Intended Use Case
I want to check if the user granted permission for push notifications in my Android/iOS app.
Is there any specific difficulty to add this permission I should know about before creating a PR ?
How can I ask for permission in Xamarin if the notification permission is disabled?
You can ask for it sometime without bothering too much the user. If he does not want any notification respect that.
Haha sure.
I think at this point it's safe to say that this won't be making it's way into Xamarin.Essentials anymore. Keep your eye on .NET MAUI for all new development! Thanks for all input and efforts here.