Skip to content

[Feature request]: Expose UNNotificationSettings.alertSetting to check if alerts are enabled #1467

@erdemyerebasmaz

Description

@erdemyerebasmaz

Is there already an issue requesting this feature?

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Use case

We have a feature that relies on silent push notifications but they are not delivered when all notification alert types(e.g. Lock Screen, Banners, Notification Center) are disabled*, even when the app is on the foreground.

We'd like to display a warning to the user if alerts are disabled, to inform them that our feature requires at least one alert type to function.

*: If all alert types are disabled, iOS deems the notification non-deliverable and drops it before it reaches the Notification Service Extension.

Additionally, please share any alternative solutions you have considered. Have you explored existing packages on pub.dev that might already address this problem?

Alternate solution is to use platform channels to access UNNotificationSettings.alertSetting, and that'll be the approach we'll take in the meantime but, I thought this is better suited to be part of this plugin.

I was unable to find an existing package on pub.dev that exposes this setting.

Proposal

Expose UNNotificationSettings.alertSetting to check if alerts are enabled.

Specific requirements or considerations

We don't have additional requirements as silent push notifications are delivered as long as one alert presentation style is enabled.

Other developers may be interested in learning the status of specific alert presentation settings such as:

Additional information or context

UNNotificationSettings.alertSetting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions