public void Run(IBackgroundTaskInstance taskInstance)
        {
            if (!(taskInstance.TriggerDetails is ToastNotificationActionTriggerDetail details))
            {
                return;
            }
            var arguments = details.Argument;

            if (string.IsNullOrEmpty(arguments))
            {
                return;
            }
            if (arguments.StartsWith("+"))
            {
                var userInput = details.UserInput.Values;
                if (userInput != null)
                {
                    var text = (string)userInput.First();
                    RfcommServerTask.SendSms(arguments, text);
                }
                else
                {
                    RfcommServerTask.DismissCall(arguments);
                }
            }
            else
            {
                RfcommServerTask.OpenApp(arguments);
            }
        }
        public async void Run(IBackgroundTaskInstance taskInstance)
        {
            // Get the deferral to prevent the task from closing prematurely
            _deferral = taskInstance.GetDeferral();

            await RfcommServerTask.UpdateNotifications();

            _deferral.Complete();
        }
        public void Run(IBackgroundTaskInstance taskInstance)
        {
            if (!(taskInstance.TriggerDetails is ToastNotificationHistoryChangedTriggerDetail details))
            {
                return;
            }

            RfcommServerTask.DismissAndroidNotification();
        }