Skip to content

How to enable "CriticalAlert" using this plugin? #183

@ali-h2010

Description

@ali-h2010

I am trying to enable "CriticalAlert" notifications.

From Microsoft documentation, it's as simple as adding the flag: UNAuthorizationOptions.CriticalAlert;

public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
    UNUserNotificationCenter center = UNUserNotificationCenter.Current;
    var options = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Sound | **UNAuthorizationOptions.CriticalAlert;**
    center.RequestAuthorization(options, (bool success, NSError error) => {
        // ...
    );
    return true;
}

https://learn.microsoft.com/en-us/xamarin/ios/platform/introduction-to-ios12/notifications/critical-alerts

How to do the same using this plugin?
Currently, i am auto registering the plugin, should i not do that i register manually with the code above?

 PushNotificationManager.Initialize(options, true);

Will they interfere with each other and work properly? i have multiple custom handlers for the notifications

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