`showToast` should consider the `NotificationSetting` and return the correct value and error message. The following blog gives an example [https://devblogs.microsoft.com/oldnewthing/20200810-00/?p=104058](url)