Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[Enhancement] Push notifications permission

Open Mikilll94 opened this issue 5 years ago • 4 comments

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.

Mikilll94 avatar Jun 10 '20 17:06 Mikilll94

Is there any specific difficulty to add this permission I should know about before creating a PR ?

softlion avatar Feb 07 '22 08:02 softlion

How can I ask for permission in Xamarin if the notification permission is disabled?

Muhammadfaizann avatar Mar 21 '22 16:03 Muhammadfaizann

You can ask for it sometime without bothering too much the user. If he does not want any notification respect that.

softlion avatar Mar 21 '22 17:03 softlion

Haha sure.

Muhammadfaizann avatar Mar 21 '22 18:03 Muhammadfaizann

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.

jfversluis avatar Aug 16 '23 15:08 jfversluis