예제 #1
0
        public override void OnReceive(Context context, Intent intent)
        {
            if (intent?.Extras != null)
            {
                string title   = intent.GetStringExtra(AndroidNotificationManager.TitleKey);
                string message = intent.GetStringExtra(AndroidNotificationManager.MessageKey);

                AndroidNotificationManager manager = new AndroidNotificationManager();
                manager.Show(title, message);
            }
        }
예제 #2
0
 public override Result DoWork()
 {
     try
     {
         //Notification
         if (InputData.GetString("Type") == "Notify")
         {
             new AndroidNotificationManager().Show(InputData.GetString("Title"), InputData.GetString("Message"));
             return(Result.InvokeSuccess());
         }
         else //DND
         {
             AndroidNotificationManager.EnableDND();
             return(Result.InvokeSuccess());
         }
     }
     catch
     {
         return(Result.InvokeFailure());
     }
 }