Unity-Technologies / NotificationsSamples

Sample project for Unity Notifications
Other
282 stars 51 forks source link

Request for reading of notification permissions #34

Closed Logan-nk closed 3 years ago

Logan-nk commented 4 years ago

Reading if notification permissions have been enabled/disabled on device would be immensely helpful when setting up notifications.

kenofori commented 3 years ago

+1

vaidasma commented 3 years ago

you can use authorization requests for iOS: https://docs.unity3d.com/Packages/com.unity.mobile.notifications@1.4/api/Unity.Notifications.iOS.AuthorizationRequest.html

For Android (permissions in general, since Android does not have notification permissions) from Unity 2020.x. Check the following documentation on how to query the permission status:

https://docs.unity3d.com/Manual/android-RequestingPermissions.html

If you still have issues after trying to implement these, do contact us again!

Logan-nk commented 3 years ago

Android requesting permissions is no longer available for notifications. It looks like checking if notifications are enabled is now on a channel by channel basis, and is a native android functionality. Would like to request again for a wrapper to read these things inside the plugin.