0

How to get the ToastNotification working on Windows 10 IoT? (Raspberry Pi 2).

  ToastBindingGeneric binding = new ToastBindingGeneric();

  binding.Children.Add(new AdaptiveText() { Text = "Foo" });

   binding.Children.Add(new AdaptiveText() { Text = "Trying to do something here hello!!!" });

  ToastContent content = new ToastContent()
  {
    Visual = new ToastVisual()
    {
      BindingGeneric = binding
    }
  };
  ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(content.GetXml()));

I'm using this code, it uses the Microsoft UWP Community Toolkit ( https://github.com/Microsoft/UWPCommunityToolkit ). For some reason it does not show a toast on the PI, but on Windows 10 desktop it does.

juFo
  • 17,849
  • 10
  • 105
  • 142

1 Answers1

3

Toast Notifications require a shell to function. However, currently, Windows IOTCore has no shell, so toast notifications are not supported. Similarly, file pickers, badge notifications, tiles and any other feature that requires a shell is not supported either.

msaleh
  • 61
  • 5