locked
Notifications RRS feed

  • Question

  • Correct me if I am wrong, but App Studio exists to expose programmers and non-programmers alike to the Windows UWP platform.  As a result, while anyone can cut a quick app without any modifications, many of the users here would probably take code and modify it in VS.   Some of them, like me , are relatively inexperienced in this platform, and have many questions.

    I would like to understand how to send a Notification to the Action Center in Windows 10.  I have searched many posts and videos and they are very abstract in their instruction and talk mainly about code structure.  Where would i instantiate that code inside of an App Studio application?  Can the polling of the URI Template the populates the Live Tile also generate a Notification or will I need a background task?

    So far, nothing I have found is very informative.  If I knew, even in a general sense, where this code would go I could follow the bouncing ball and connect the dots myself, but I don't even know where to start at all.  Is there any help I can get?   Am I no looking in the right places?


    DWM

    Monday, July 25, 2016 1:12 PM

Answers

All replies

  • Hey Devin, hopefully someone who has experience with App Studio can chime in.

    I'm Andrew from the Windows Notifications team - my team owns Toasts and Live Tiles. But I don't have any experience with App Studio.

    > Can the polling of the URI Template the populates the Live Tile also generate a Notification

    No, they cannot. Toast notifications are either push (from a web server), local (from your app's local code), or scheduled (scheduled in the future from your app's local code).

    > will I need a background task?

    The answer is likely yes. Could you explain what scenario you're trying to light up? Is this a notification that the user receives when they get a new message? Is it a notification reminding the user that they have something due? The first step is helping us understand your scenario so we know what to recommend (push vs local vs scheduled)!

    Tuesday, July 26, 2016 12:35 AM
  • Thank you for the response.  My desire is to just have a notification go to the Action center whenever a new item comes in such as a new Announcement.    It does not have to pop-up, I just want it to go in the Notification center.

    The question I have is what is new, especially from an RSS perspective.  How do I not send multiple notifications for the same item, etc.   For the time being, its ok if the notification is local only for now.  I am trying to take this in small steps, I just want to successfully send a notification so I can get a feel for how it works.


    DWM

    Tuesday, July 26, 2016 12:48 AM
  • Here's the quickstart for a normal C# app that explains how to send local toasts: https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/07/08/quickstart-sending-a-local-toast-notification-and-handling-activations-from-it-windows-10/

    But I'm not sure whether you can use C# code in App Studio? Let me know if that link helps you at all.

    To avoid re-sending notifications for the same item, you'll have to store something in your local app data that tracks "Is this RSS news story new or not?".

    You can export your existing App Studio project into a native project, and edit the code in Visual Studio, right? That might be your only option for adding more advanced features like this.

    Tuesday, July 26, 2016 3:57 AM
  • Yes - I am in Visual Studio already, thanks. Your link is very helpful.  I was thinking there would be something local to track new RSS, but I was unsure how that worked in this platform.  I would think previously I would modify a config file or a registry entry when a new item came in and then check before issuing a new toast, I don't know if that is handled differently or if there is a better way to do that.


    DWM

    Tuesday, July 26, 2016 2:32 PM
  • UWP's don't have access to the registry, but local settings is basically the equivalent

    var settings = Application.Current.LocalSettings;

    You could inject items into the settings, to track which RSS items you've seen. Or you can use files and write to a file via the LocalFolder...

    var folder = ApplicationData.Current.LocalFolder;

    LocalSettings would be the easiest option. LocalFolder would probably be the ideal design though (settings is really meant for settings, as the name implies, not for storing a list of RSS links).

    Wednesday, July 27, 2016 10:46 PM
  • Hi,

    From the Windows App Studio Team just to say that we are evaluating sending Push Notifications when content is added to Collections.

    That said, as you were commeting, you can explore different matterials to add Push Notifications to your generated code. Here is another resource: https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-windows-store-dotnet-get-started-push/ 

    Best Regards!

    • Marked as answer by Devin McMahon Monday, November 14, 2016 6:45 PM
    Friday, July 29, 2016 12:03 PM
    Moderator
  • Thank you for all the assistance, I am happy to hear that App Studio is considering Push Notifications.  I have enough now to get started on some experimentation

    Thanks again


    DWM

    Friday, July 29, 2016 2:20 PM