Friday, October 07, 2016

Get feedback for your app via the Feedback Hub app #UWPLunch

All this month, I'm taking some time each day to explore (and document) things that are related to UWP development that I haven't fully investigated or used before. While doing it over lunch each day I'm calling it #UWPLunch.

Apps that don't make it easy to provide feedback can be very frustrating for the people using them.
Windows 10 includes the Feedback Hub as a way of providing feedback and information about the OS and the apps that come with it. Additionally, you can also use it to capture feedback about your app.

I looked at this when it was first announced but it's changed since then. (Most notably the 'Feedback' class is now called 'Engagement'.) Here's how to do it now.

Firstly you need to install the Microsoft Store Services SDK.
This will let you add the appropriate reference to your project.


It's recommended that you use the standard icon to indicate the ability for you to send feedback. There's a glyph for this in the MDL2 Assets font file.
Here's how to use it in a TextBlock, but you could put it in a button too.

  <TextBlock Text="&#xE939;" FontFamily="Segoe MDL2 Assets" />

The Feedback Hub doesn't run on as many devices as your UWP app could so you should really test fro support before trying to use it

Fortunately, there's a static method which will tell you.

Microsoft.Services.Store.Engagement.StoreServicesFeedbackLauncher.IsSupported()

To launch the feedback hub it's a simple call:

    var feedback = StoreServicesFeedbackLauncher.GetDefault();
    await feedback.LaunchAsync();

or if you want to send some information with ti, that's possible too.

    var optionalFeedbackInfo = new Dictionary<string, string>();
    optionalFeedbackInfo.Add("key", "value");

    await feedback.LaunchAsync(optionalFeedbackInfo);

This will launch the app


And you'll see the feedback in the store.
Simples.

If you want more details on setting this up see the instructions at https://msdn.microsoft.com/windows/uwp/monetize/launch-feedback-hub-from-your-app

0 comments:

Post a Comment

I get a lot of comment spam :( - moderation may take a while.