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); } }
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()); } }