Yanıt Guidelines to display toast notifications

  • 07 Ekim 2011 Cuma 15:18
     
     

    In the documentation of MSDN (for toasts) it was mentioned that toasts should not be used to display critical alerts that need immediate user attention. In this case, the information should be displayed in the app or the tile. But the app may be suspended and the tile may not be visible to the user so toast is the only choice.

    I was wondering how 'Windows Defender' or 'Windows Firewall' handles this situation when a critical toast needing immediate user attention is required. 

Tüm Yanıtlar

  • 07 Ekim 2011 Cuma 18:31
    Moderatör
     
     

    A toast by definition is a message that is displayed briefly and then goes away on its own.  It the app is suspended, it will not be sending toasts anyhow.  If you have an app that is a critical app like defender, they you should design this as a Desktop app and not a Metro Style app.  It can then send messages via the tray notification.


    Jeff Sanders (MSFT)
  • 07 Ekim 2011 Cuma 18:43
     
     

    There can be a background task that shows toasts no? Is the toast clickable (and the app showing showing the toast gets click notification)? Or the sole purpose of the toast is to show a notification and the user is responsible for opening the app.

    Just writing a desktop app doesnt solve the problem unfortunately. If 'Windows Firewall' or Defender wants the user to take an action on something it has detected (like a malware\trojan) and if the user is on Metro UI, how is the messaging going to work? Without  a toast, the user will have no idea that a user action is needed for Defender\Firewall to act upon a malware detection. And if user spends all his\her time on Metro, such desktop apps are potentially hosed for ever?

  • 14 Ekim 2011 Cuma 12:44
    Moderatör
     
     Yanıt

    Standby for more information about how desktop applications will interact in this way.  We have not released any Windows 8 Desktop application programming information as of yet.

    -Jeff


    Jeff Sanders (MSFT)
  • 17 Ekim 2011 Pazartesi 06:53
     
     
    To expand this question, how to  send messages via the tray notification with desktop app? Another, what time release windows 8 Desktop application programming information?
  • 21 Ekim 2011 Cuma 21:52
     
     
    I also would like to know what happens to those critical alerts if the user on the Metro mode has switched off the app alerts...?
  • 21 Ekim 2011 Cuma 22:56
    Moderatör
     
     

    Users have the ultimate control over whether they see toasts or not.  If the user turns off app alerts then the user will not receive app alerts.  There is no guarantee that a user will see a toast, so they shouldn't be used as the sole channel to communicate critical events.

    As the guidelines suggest, if it is critical that the user sees a notification then the notification needs to be displayed somewhere persistent so it is still available when the user is ready to look.  Tiles and the app itself are the only such places.

    A toast can be used as an additional means, but there is no way to ensure the user will see the toast: toasts may be turned off, the user may be looking away, etc.

    --Rob

  • 22 Kasım 2011 Salı 02:52
     
     

    I am very much interested in this topic, since our application may require the user's immediate attention. Currently we have small notification windows that show up on top of all other apps, where the user can take an action or ignore it. Pretty much similar to the Outlook incoming email notification.

    Is there a way to notify the user about an imminent action while the user is in another Metro UI application?

    My Windows Phone will display an incoming call on top of any other running app for instance. Is there something similar for Windows 8?

     

    Florin

  • 30 Kasım 2011 Çarşamba 15:02
    Moderatör
     
     

    Standby for more information about how desktop applications will interact in this way. We have not released any Windows 8 Desktop application programming information as of yet.

    -Jeff


    Jeff Sanders (MSFT)
  • 04 Mart 2012 Pazar 03:27
     
     

    Is there any update about toast on Windows 8 Consumer Preview?

    Is following volume notification belongs to toast? How to show it in desktop application?

    volume notify

     notification sample

  • 04 Mart 2012 Pazar 03:31
    Moderatör
     
     Yanıt
  • 04 Mart 2012 Pazar 03:57
     
     
    That's great, thanks for quickly response!!
  • 08 Mart 2012 Perşembe 14:08
     
     

    Hi there!

    One question: Is it possible to change the background and text color of a toast notification send from a desktop application? I did not find anything in the docu...

  • 13 Mart 2012 Salı 16:36
     
     Önerilen Yanıt

    The samples require Visual Studio 11 to build. Is there a way to build toast notification code with Visual Studio 10 by any chance? I don't want to migrate our entire solution to VS 2011, just so we can show a toast from our desktop app... Any thoughts?

  • 13 Mart 2012 Salı 16:45
    Moderatör
     
     

    You should be able to use VS10. The code in How to enable desktop toast notifications through an AppUserModelID is straight COM, not C++/Cx.

    You would need to convert the actual sample (I didn't check, but this could be as simple as copying the source files into a VS10 project) and you may need newer header files than were included in VS10.

    --Rob

  • 06 Nisan 2012 Cuma 18:36
     
     
    As far as I can tell, in order to use toast, I need to add a new dependency (something .winmd) and only VS 11 recognizes .winmd files and can add them as dependencies to my C# project. I haven't tried C++.
  • 09 Nisan 2012 Pazartesi 22:33
    Moderatör
     
     Önerilen Yanıt

    The C++ Sending toast notifications from desktop apps sample is pure COM and doesn't rely on a winmd file. It should work fine in VS2010 plus the Windows 8 SDK, although it may need some updating if the sample uses new C++ syntax that wasn't available in the older version (nothing jumps out at me, but I don't have VS2010 handy to check).

    The C# sample does rely on the winmd file for the Windows Runtime class metadata. You should still be able to send a toast from C# in an older compiler, but you may need to write the pinvoke signatures and runtime-callable wrappers yourself.

    You might also try spliting your project and write an assembly with VS11 which can be called from the VS10 assemblies.

    --Rob