什么是Windows Phone 8.1 Universal Apps中MarketplaceReviewTask的替代品

LPa*_*ins 14 windows-phone-8.1 win-universal-app

我到处寻找,只是找不到从我的应用程序启动Rate and Review的方法.有谁知道如何在新的Windows Phone 8.1上启动此任务?

小智 39

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

这很好!

  • 关闭这个.我昨天发布了我的应用程序的测试版,这绝对适用于发布后.谢谢@ user3496220. (2认同)

Rom*_*asz 14

没有直接替代MarketplaceReviewTask.现在它的工作原理是这样的 - 通过使用适当的Uri 启动UriAsync - 在'MSDN - 在商店中链接到您的应用程序'中描述:

查看您可以使用的应用程序:

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"));
Run Code Online (Sandbox Code Playgroud)

在上面的链接(MSDN)中,您还可以找到Uri结构,以导航到详细信息页面并在商店中搜索指定的内容.

另请注意,Windows Phone 8.1与WP 8.0具有向后兼容性,因此用于启动内置应用程序的所有URI方案都可以使用.所以你也可以像这样使用它们:

审查应用程序:

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

查看应用程序的详细信息页面:

await Windows.System.Launcher.LaunchUriAsync(new Uri(@"zune:navigate?appid=[app ID]"));
Run Code Online (Sandbox Code Playgroud)


小智 6

我可以确认user3496220发布的方法是否正常工作,但前提是您正在使用Dev Center(不是CurrentApp.AppId)的应用程序ID,在您的情况下这样:

await Windows.System.Launcher.LaunchUriAsync(
    new Uri("ms-windows-store:reviewapp?appid=fc0c29fc-f615-4753-aad7-5cf760ca5d2d"));
Run Code Online (Sandbox Code Playgroud)