MarketplaceSearchTask for windows phone 8.1

2019-08-06 05:32发布

问题:

I have been searching for Market Place Search task for windows phone 8.1 from last 2 days and I got answer from below link :

Are there any class in WinRT as MarketPlaceReviewTask in WP?

I tried with given solution but It is not working as suggested.

So, Can any one help me with market search functionality on windows phone 8.1? Same functionality is available in silverlight phone.

回答1:

In Windows Phone 8.1, You can use Launcher to Launch a special URI:

await Windows.System.Launcher.LaunchUriAsync(
    new Uri(string.Format("ms-windows-store:search?{0}={1}", type ,searchTerms)));

The type can be 'keyword' or 'publisher', and searchTerms is the keyword you wanna search.



回答2:

You may still use URI schemes for WP8.0 (WP8.1 has backward compatibility). As I've tried the code below works fine:

await Launcher.LaunchUriAsync(new Uri(@"zune:search?keyword=test&contenttype=app"));

At the link above you will also find some other nice URIs - navigate to app, search for specific publisher and more.