Search code examples
windows-8windows-runtimewinrt-async

Are there any class in WinRT as MarketPlaceReviewTask in WP?


Are there any class in WinRT as MarketPlaceReview or MarketPlaceSearch Tasks in WP?

Thanks.


Solution

  • You can use Windows Store's protocol with specific arguments to launch several tasks related to Store like

    If you want to open review page for any app then, you can open with this line.

    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:REVIEW?PFN=MY_PACKAGE_FAMILY_NAME"));
    

    If you open the page of particular app in Store app then you can open with this line.

    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:PDP?PFN=MY_PACKAGE_FAMILY_NAME"));
    

    MY_PACKAGE_FAMILY_NAME can be found in Package.appxmanifest file.

    enter image description here

    If you want to search within Store then you can open the Store app with search result with this line.

    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:Search?query=YOUR_SEARCH_KEYWORDS"));
    

    The below are the examples which open review page for Nokia Music app, the app page itself & queries Store with text "nokia music" respectively.

    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:REVIEW?PFN=NokiaCorporation.NokiaMusic_6d0q6r3z979nw"));
    
    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:PDP?PFN=NokiaCorporation.NokiaMusic_6d0q6r3z979nw"));
    
    await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:Search?query=nokia music"));