Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ali-h2010 opened this issue Oct 19, 2022 · 1 comment
Open

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

ali-h2010 opened this issue Oct 19, 2022 · 1 comment

Comments

@ali-h2010
Copy link

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

@ali-h2010
Copy link
Author

I tried to add the code but Critical notifications still don't show. The option to enable or disable critical alerts is also not showing. I filled a form to enable critical notification to Apple. Maybe it's a requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant