Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPermissionNotGranted = errors.New("notification permission not granted")
ErrPermissionNotGranted is returned by Notify when a registered provider cannot post because the OS has not granted notification permission.
Providers deliver through a void platform call — Android's NotificationManagerCompat.notify, for example — so a dropped notification is invisible to Go. The Android shell's Notifier.Show returns early when the permission is missing (correctly: posting would be discarded anyway), which left Notify returning nil for a notification the user never saw, and every caller reporting success for a no-op. Checking the permission first is the only way to tell the two apart.
Functions ¶
func PermissionGranted ¶
func PermissionGranted() bool
func RequestPermission ¶
func RequestPermission() string
func SetNotifier ¶
func SetNotifier(n Notifier)
Types ¶
Click to show internal directories.
Click to hide internal directories.