简体   繁体   中英

Windows Phone 8.1 Store app - Link to store

In Windows 8.1 Apps we can link to store apps using ms-windows-store protocol.

var storeURI = new Uri("ms-windows-store:PDP?PFN=<package family name>");
await Windows.System.Launcher.LaunchUriAsync(storeURI);

Is there any similar ways in Windows Phone 8.1? I prefer not to link to the webpage of the app on the store ( http://windowsphone.com/s?appId=appGUID ) which then opens the app in the store. I want to directly open the app in the store.

In Windows Phone 8.1, We can use ms-windows-store protocol to link to the store.

To detail page:

var uri = new Uri(string.Format("ms-windows-store:navigate?appid={0}", appid));
await Windows.System.Launcher.LaunchUriAsync(uri);

To review page:

var uri = new Uri(string.Format("ms-windows-store:reviewapp?appid={0}", appid));
await Windows.System.Launcher.LaunchUriAsync(uri);

To search page:

var uri = new Uri(string.Format(@"ms-windows-store:search?keyword={0}",keyword));
await Windows.System.Launcher.LaunchUriAsync(uri);

you can use the MarketplaceDetailTask and open the page from the app store for the app:

var marketplaceDetailTask = new MarketplaceDetailTask(); 
marketplaceDetailTask.ContentIdentifier = "<GUID of the app>"; // optional
marketplaceDetailTask.Show();

You can optionally specify which app you want to open, default is the current app.

More info:

http://msdn.microsoft.com/en-us/library/windows/apps/microsoft.phone.tasks.marketplacedetailtask(v=vs.105).aspx

 await Launcher.LaunchUriAsync(
          new Uri("ms-windows-store:reviewapp?appid=723e25d1-a0ee-4824-b389-XXXXXX"));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM