14

I've looked everywhere and just can't find a way to launch the Rate and Review from my app. Does anyone know how to launch this task on the new Windows Phone 8.1?

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150
LPains
  • 942
  • 12
  • 21

7 Answers7

39
await Windows.System.Launcher.LaunchUriAsync(
    new Uri("ms-windows-store:reviewapp?appid=" + CurrentApp.AppId));

this is good!

Rico Suter
  • 11,548
  • 6
  • 67
  • 93
刘白菜
  • 408
  • 3
  • 4
  • Did you try it on a windows phone? Did it work? Because I tried what @Romasz suggested which is similar to this and it won't work. – LPains Apr 21 '14 at 14:46
  • Ok. I tested this and it works. However a real test can only be done once the application has been published the first time. – LPains Apr 25 '14 at 03:28
  • 2
    To close this off. I've published a beta version of my app yesterday and this definitely works after published. Thanks @user3496220. – LPains May 23 '14 at 14:20
14

There is no direct replacement of MarketplaceReviewTask. Now it works like this - by using LaunchUriAsync wit appropriate Uri - described at 'MSDN - Link to your app in the Store':

to review the app you can use:

await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:reviewapp?appid=[app ID]"));
// or simply for the current app:
await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:reviewapp"));

At the link above (MSDN) you find also Uri structure to navigate to details page and search for specified content in the store.

Note also that Windows Phone 8.1 has backward compatibility with WP 8.0, therefore all URI schemes for launching built-in apps work. So you can also use them like this:

to review the App:

await Windows.System.Launcher.LaunchUriAsync(new Uri(@"zune:reviewapp?appid=app" + YourAppID));

to see details Page of the App:

await Windows.System.Launcher.LaunchUriAsync(new Uri(@"zune:navigate?appid=[app ID]"));
Romasz
  • 29,662
  • 13
  • 79
  • 154
  • Yeah I saw this approach as well, however I'm unable to test it yet because I can't use the emulators as I'm using a virtualized Windows 8.1 for development. I will accept your answer once I'm able to test it. Thanks. – LPains Apr 11 '14 at 00:22
  • Ok, I managed to get the emulator working and tried this but instead of opening the store it opens the Xbox Music app. Really odd. I supposed it could be because the store doesn't install any apps... Anyway, I will keep this open until I can test on the phone itself. – LPains Apr 13 '14 at 00:08
  • @LPains I think this is a problem with emulator. I'm also willing to check it when the developer preview is released. – Romasz Apr 13 '14 at 05:13
  • 1
    Yep. Just tested on a Windows Phone running 8.1 and still doesn't work as expected. When that Uri is invoked it opens the Music app. – LPains Apr 16 '14 at 02:29
  • @Lpains Did the zune:reviewapp?app=app[ID] alternative work on Windows Phone 8.1? – Rowinson Gallego Jul 17 '16 at 03:16
  • @RowinsonGallegoMedina no it did not. – LPains Jul 18 '16 at 19:33
6

I can confirm that the method posted by user3496220 is working but only if you are using app id of your app from Dev Center (not CurrentApp.AppId) Like this in your case:

await Windows.System.Launcher.LaunchUriAsync(
    new Uri("ms-windows-store:reviewapp?appid=fc0c29fc-f615-4753-aad7-5cf760ca5d2d"));
Rico Suter
  • 11,548
  • 6
  • 67
  • 93
1

I know that this question is specifically about Windows Phone 8.1 Universal Apps. But since the main reason to build a universal app is to have one app running both on Windows Phone 8.1 and on Windows 8.1, I'd like to add, that the link is different for Windows Store Apps.

As described in MSDN (http://msdn.microsoft.com/en-us/library/windows/apps/Hh974767.aspx) the link syntax is a bit different:

To create the Windows Store protocol link, append the Package Family Name of your app to the URL:

ms-windows-store:[action]P?PFN=[Package Family Name]

You can retrieve the Package Family Name for your app either from Microsoft Visual Studio, or by visiting your app’s web-based listing page and viewing the page source.

Possible Actions:

PDP     Opens an app's listing page.

Review  Opens the "Write a review" page of an app's listing.    

Example Link to request a store review:

ms-windows-store:REVIEW?PFN=6509Knattips.StopNow_eadn2jc3headp
stefan.s
  • 3,489
  • 2
  • 30
  • 44
  • The question started off as Windows Phone 8.1 only. Someone changed it to Universal Apps... Thanks for the answer though. – LPains Oct 17 '14 at 20:47
  • 1
    This helped me! I was under the impression that the same solution would work for both platforms...But of course Microsoft didn't make it that easy. *facepalm* – Whyser May 28 '15 at 08:28
0

Ok. I got this sorted out. I'm not sure whether it is the best way to do it, but that's the only way it worked.

Instead of using any special Uri I linked directly to my app store link like this. As described in MSDN.

There is one issue though, if you never published the app you want to enable review, you won't have a link.

Thanks @Romasz for sharing the MSDN link.

LPains
  • 942
  • 12
  • 21
  • I've tested it today and I've the same issue. I believe it's some kind of a bug that it opens Music Hub instead of Windows Store. Thank you for sharing the other possibility. – Romasz Apr 16 '14 at 04:43
0

This will open IE which redirects to the store:

await Launcher.LaunchUriAsync(CurrentApp.LinkUri);
Rico Suter
  • 11,548
  • 6
  • 67
  • 93
Faisal
  • 623
  • 6
  • 11
0

I found a tricky way to distinguish a windows phone 8.1 against a windows phone 10, function at https://stackoverflow.com/a/37641902/3172445 based on that function i used the following code to make the rating function works on wp8.1 and wp10 (tested on Nokia Lumia 925, Nokia Lumia 735 and Nokia Lumia 930 )

        private async void OnTapRateThisApp(object sender, RoutedEventArgs e)
        {
            bool launched = false;
            try
            {
                // FUNCTION at https://stackoverflow.com/a/37641902/3172445
                if (this.liIsWindowsPhone81(false))
                {
                    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:reviewapp?appid=" + CurrentApp.AppId));
                }
                else
                {
                    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store://review/?PFN=" + Package.Current.Id.FamilyName));
                }

                launched = true;
            }
            catch{}
            if (!launched)
            {
               // Unable to launch the uri
            }
        }

I want to highlight that the app on which I'm working on, is a windows phone only, is not UWP.

Hope it helps

Community
  • 1
  • 1
Luca Iaco
  • 3,387
  • 1
  • 19
  • 20