locked
Print time Toast Notification:

    Question

  • Purpose: Show Print time custom toast notifications in WSDA.Project Background : XPS v4 print driver )

    As per the following link ("http://msdn.microsoft.com/en-us/library/windows/hardware/dn391718(v=vs.85).aspx") we have done the changes in appmanifest file and added the background task project.

    After the changes in Appmanifest file, we were getting the system generated toast. But the background task entry point was not getting executed, from where we can customize the toast.

    Could any one help me in this regards.

    Monday, February 10, 2014 1:15 PM

All replies

  • Hi,

    There may be some reasons in your Background task:

    Possible cause: Your entry point for the background task (IBackgroundTask) is within the same project as your foreground app. This is not allowed. Separate out an entirely new class for your background task handler.

    Possible cause: The class that is the entry point for notifications in your app is incorrectly given in your manifest or device metadata, causing the app to crash within the backgroundhost and not showing any toast. Check the following:
    • Make sure the entry point is given correctly in the Declarations tab of the Manifest Designer. It should be in the form of Namespace.ClassName for C# and C++. For JavaScript, it should be the relative directory path to the .js file.
    • The C# class has to implement Windows.ApplicationModel.Background.IBackgroundTask and has to have a public void Run(Windows.ApplicationModel.Background.IBackgroundTaskInstance taskInstance) method.

    You can refer to Troubleshooting in the link to get more information:

    http://msdn.microsoft.com/en-us/library/windows/hardware/dn391718(v=vs.85).aspx

    And i recommend you can see Create and register a background task to make sure whether you create a background Task sucessfully.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, February 11, 2014 2:50 AM
  • Thanks for your reply.

    I think what ever possible causes you have described,I have done all that steps correct.

    I have created a separate project for the background task. The name of the class was :

    (class PrintBackgroundTask : Windows.ApplicationModel.Background.IBackgroundTask) and the name of the Namespace was : Icarus.BackgroundTask.

    We have added the entry point for the background task system event "Icarus.BackgroundTask.PrintBackgroundTask"

    Instead of that the Run method is not executed.(We have tried to show some hard coded toast message from the run method that is not coming.)

    Our foreground apps and the background apps lies in the same solution. But in a separate project.

    Could any one give the required settings for this with some example.

    Tuesday, February 11, 2014 6:28 AM
  • What should be the event handler ID and Event asset name in the metadata file.

    Please give the reply using a example.

    I think i have done a mistake there only.

    Tuesday, February 11, 2014 6:45 AM
  • Hi,

    You can see  Create device metadata for your Windows Store device app (Windows 8.1)

    And refer to the sample:

    Print settings and print notifications

    In the link above, you can see Install the sample steps, try to follow them.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Wednesday, February 12, 2014 7:02 AM
  • I have tried all the steps, but still did not get any notification.

    Now I have used windows SDK sample ("http://code.msdn.microsoft.com/windowsapps/Device-app-for-printers-91f363a9"). When I pressed Ctrl + P our print object was showing. I have selected the object and click on the more settings. The Wondows SDK window was coming there. But when I fired print did not get any toast notification. Instead of the printer in  an error state I did not get that notification. But in desktop application I got that toast in desktop.(Already notification support are available from our core driver)

    I have done the following changes :

    In the meta data Imported the Appmanifest file for this SDK apps.

    Added EventID = "PrintBackgroundTask" Event Assets = "BackgroundTask.PrintBackgroundTask".

    could you help me to get toast using windows SDK apps.


    Wednesday, February 12, 2014 12:26 PM