locked
Best way to have a recurring toast show at regular intervals? RRS feed

  • Question

  • I want to create a store app that shows a toast message to the user at regular intervals (say, every 15 min or 30 min). The toast message can vary (for example, displays the system time). My app won't be on the lock screen and needs to show the toast even when my main app is closed.

    What's the best way to handle this? BackgroundTask? BackgroundWorker? Other?


    • Edited by JefffRozar Saturday, February 1, 2014 1:43 PM
    Saturday, February 1, 2014 1:40 PM

Answers

  • The best way is to push the notification from another system.

    If you're not on the lock screen your other option would be to pre-schedule the updates when the app is in the foreground, but that obviously would only work if the message can be predicted (like your time example).

    --Rob

    Saturday, February 1, 2014 3:57 PM
    Moderator
  • See Push notification overview .

    Windows Store apps and desktop apps (including services) cannot communicate with each other. Is there a reason you want to make this Windows Store app? They are not designed as replacements for services.

    --Rob

    Sunday, February 2, 2014 5:50 AM
    Moderator
  • Toast api is available from the desktop. maybe that brings a solution


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Sunday, February 2, 2014 11:20 AM

All replies

  • The best way is to push the notification from another system.

    If you're not on the lock screen your other option would be to pre-schedule the updates when the app is in the foreground, but that obviously would only work if the message can be predicted (like your time example).

    --Rob

    Saturday, February 1, 2014 3:57 PM
    Moderator
  • Coming from the land of Windows Services, it sure would be nice to use a service to communicate the information the Metro app could then display? What do you mean by 'another system'? My app would need to run even without an Internet connection.

    • Edited by JefffRozar Saturday, February 1, 2014 5:21 PM
    Saturday, February 1, 2014 5:11 PM
  • See Push notification overview .

    Windows Store apps and desktop apps (including services) cannot communicate with each other. Is there a reason you want to make this Windows Store app? They are not designed as replacements for services.

    --Rob

    Sunday, February 2, 2014 5:50 AM
    Moderator
  • Toast api is available from the desktop. maybe that brings a solution


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Sunday, February 2, 2014 11:20 AM