简体   繁体   中英

Open windows store in a windows phone silverlight app

I'm using silverlight to build apps for windows phone 7, 8.0 and 8.1

I have an URI in my code that contains ms-windows-store:PDP?PFN=SupportingComputersInc.Fhotoroom_pxc4cxt3rds1p

I'm trying to open the windows store to this specific app.

I found this code:

Launcher.LaunchUriAsync(uri);

But it is just opening xbox music. Then, I found that:

var options = new Windows.System.LauncherOptions();
options.PreferredApplicationPackageFamilyName = "SupportingComputersInc.Fhotoroom_pxc4cxt3rds1p";
options.PreferredApplicationDisplayName = "Fhotoroom app";
Launcher.LaunchUriAsync(uri, options);

But when I run this code I get a not implemented exception.

Is there another way to open the windows store on windows phone? Am I doing something bad here?

Windows Phone provides special launchers that should do the trick, for example to show a certain app's detail page in Store:

MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentIdentifier = "INSERT_APP_ID";
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;
marketplaceDetailTask.Show();

For a summary of what else is possible (eg, show the store's search result page for certain search key words) see Launchers for Windows Phone

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