locked
TileUpdater.Clear() not freeing up notifications quota

    Question

  • Nature of my application requires scheduling a lot of tile updates well in advance. I am aware of the overall limit of notifications of 4096.

    Sometimes circumstances change and I have to dump all scheduled notifications and start anew.

    Unfortunately, I have noticed TileUpdater.Clear() does not properly clear the tile notification quota. I.e. if I have 4k notifications scheduled, called TileUpdater.Clear(), and immediately started scheduling new tile updates, I can schedule only a few before starting to get ERROR_NOT_ENOUGH_QUOTA. The tile itself is cleared in the UI, but the quota is not released.

    Is there any way to ensure Clear() clears the quota as well?

    Thanks!

    Wednesday, September 19, 2012 9:27 PM

Answers

  • maybe as workaround remove the items your self? get the schedulednotifications and remove them one by one?

    Wednesday, September 19, 2012 10:31 PM
  • Hello,

    I spent some time today looking through the source code. From what I can see in the source the scheduled notifications should be removed from the notification queue when the TileUpdater.Clear() method is called. I would expect that the total outstanding notifications should be reset as well.

    If you can provide a simple VS project that reproduces the issue we can verify the behavior and file a bug if appropriate. Please zip up the project and put it on your Skydrive and then post the link here.

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, September 26, 2012 10:16 PM
    Moderator
  • Hi James,

    I'm experiencing this problem as well. It's been a few days since your request so I thought I'd help out and create the sample you've requested. You'll find it here:

    https://skydrive.live.com/redir?resid=9035CA88B8AFC674!532&authkey=!AOLyMHf7Bvt6VHU

    It's pretty straightforward:

    • run the app
    • hit the button, this will clear any existing notifications and create 4096 new ones.
    • hit the button again. This should also clear existing notifications and add 4096 new ones. But it returns the error as described above.

    Hope that helps,

    Matthew.


    oops, just realised this thread is in a C++ forum. I found it via a search. Sorry for posting a sample in C#.
    Saturday, October 6, 2012 5:28 AM
  • Thanks Matthew,

    I finally got around to creating the sample as well. Mine can be found at https://skydrive.live.com/redir?resid=17A230A707FC5889!395&authkey=!AN-Dn5JidSfiNZ0

    Thanks!

    Saturday, October 6, 2012 8:34 PM
  • Hello,

    Sorry for not following up sooner. We do have a bug open on this issue and we are looking at possible ways to resolve the problem including updating the documentation.

    Thanks for your patience as we look into this issue,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, October 31, 2012 9:49 PM
    Moderator

All replies

  • maybe as workaround remove the items your self? get the schedulednotifications and remove them one by one?

    Wednesday, September 19, 2012 10:31 PM
  • maybe as workaround remove the items your self? get the schedulednotifications and remove them one by one?


    This works, but TileUpdater::GetScheduledTileNotifications() for 4k notifications is incredibly slow (5+ seconds on quad-code desktop), synchronous, and cannot be cancelled. Adding notifications back isn't that fast either, but at least I can stop the cycle if the app is getting suspended or operation is cancelled.
    Wednesday, September 19, 2012 11:16 PM
  • Hi,

    There is a limitation of scheduling notification.

    The app's call to the AddToSchedule method fails
    Possible cause: You've exceeded the maximum allowed number of scheduled notifications.
    Fix: Both TileUpdater.addToSchedule and ToastNotifier.addToSchedule will fail if you attempt to schedule more than 4096 notifications. Reduce your number of scheduled notifications.

    Please check this document
    http://msdn.microsoft.com/en-us/library/windows/apps/hh761464.aspx

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Proposed as answer by Jesse Jiang Monday, September 24, 2012 3:10 AM
    Friday, September 21, 2012 3:09 AM
  • Hi,

    There is a limitation of scheduling notification.

    The app's call to the AddToSchedule method fails
    Possible cause: You've exceeded the maximum allowed number of scheduled notifications.
    Fix: Both TileUpdater.addToSchedule and ToastNotifier.addToSchedule will fail if you attempt to schedule more than 4096 notifications. Reduce your number of scheduled notifications.

    Please check this document
    http://msdn.microsoft.com/en-us/library/windows/apps/hh761464.aspx

    Jesse, thanks for your response, but it seems you did not read my post. I am well aware of 4096 notifications quota (I even specifically mentioned that). The problem I am having is removing all scheduled notifications using TileUpdater.Clear() does not free up the quota. After this method is called, there are no scheduled notifications left, therefore I should be able to schedule up to 4096 new notifications. Yet, this is not the case.

    To clarify, repro steps:

    1) Schedule 4096 notifications;

    2) Remove all scheduled notifications using TileUpdater.Clear();

    3) Schedule 4096 notifications;

    EXPECTED: step (3) works

    ACTUAL: step (3) fails

    Monday, September 24, 2012 6:08 PM
  • Hello,

     

    Thanks for your feedback, I will involve more experts to investigate it.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 26, 2012 6:44 AM
  • Hello,

    I spent some time today looking through the source code. From what I can see in the source the scheduled notifications should be removed from the notification queue when the TileUpdater.Clear() method is called. I would expect that the total outstanding notifications should be reset as well.

    If you can provide a simple VS project that reproduces the issue we can verify the behavior and file a bug if appropriate. Please zip up the project and put it on your Skydrive and then post the link here.

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, September 26, 2012 10:16 PM
    Moderator
  • Hi James,

    I'm experiencing this problem as well. It's been a few days since your request so I thought I'd help out and create the sample you've requested. You'll find it here:

    https://skydrive.live.com/redir?resid=9035CA88B8AFC674!532&authkey=!AOLyMHf7Bvt6VHU

    It's pretty straightforward:

    • run the app
    • hit the button, this will clear any existing notifications and create 4096 new ones.
    • hit the button again. This should also clear existing notifications and add 4096 new ones. But it returns the error as described above.

    Hope that helps,

    Matthew.


    oops, just realised this thread is in a C++ forum. I found it via a search. Sorry for posting a sample in C#.
    Saturday, October 6, 2012 5:28 AM
  • Thanks Matthew,

    I finally got around to creating the sample as well. Mine can be found at https://skydrive.live.com/redir?resid=17A230A707FC5889!395&authkey=!AN-Dn5JidSfiNZ0

    Thanks!

    Saturday, October 6, 2012 8:34 PM
  • Hi, 

    The last two posts have been marked as answers but that isn't correct. They are samples for reproducing the problem as requested by James Dailey.

    To restate the problem, TileUpdater.Clear() does not properly clear the tile notification quota.

    Thanks

    Matthew.

    Tuesday, October 9, 2012 10:44 AM
  • Hi,

    I can confirm this issue here. TileUpdater.Clear() does not seem to clear anything and GetScheduledTileNotifications() still returns the scheduled notifications after calling Clear(). Until someone is looking into this and provides a fix, removing notifications manually with RemoveFromSchedule() seems to be a possible workaround.

    Christoph

    Wednesday, October 31, 2012 9:36 PM
  • Hello,

    Sorry for not following up sooner. We do have a bug open on this issue and we are looking at possible ways to resolve the problem including updating the documentation.

    Thanks for your patience as we look into this issue,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, October 31, 2012 9:49 PM
    Moderator