本文介绍了Windows Phone 打开另一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从我的应用程序打开一个新应用程序.如果手机上没有安装,我需要在windows store里面打开安装.

I need to open a new application from my application. If it is not installed on the phone then I need to open the installation inside windows store.

有人知道我怎样才能做到这一点吗?

Anybody have an idea how can I achieve this?

我阅读了以下文章,但找不到任何有用的内容:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207014%28v=vs.105%29.aspxhttp://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206987%28v=vs.105%29.aspx

I read the below articles but I couldn't find anything helpful:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207014%28v=vs.105%29.aspxhttp://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206987%28v=vs.105%29.aspx



答案:

对于我最终使用的商店:

For the store i ended up using:

private async void test()
    {
        try
        {
            Uri uri = new Uri("zune://navigate/?appid=xxx-xxx-xxx-xxx");
            await Launcher.LaunchUriAsync(uri);
        }
        catch (Exception exception)
        {
            //TODO
        }
    }

推荐答案

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662937(v=vs.105).aspx描述如何启动商店应用程序并显示特定应用程序

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662937(v=vs.105).aspxdescribes how you can launch the store app and display a specific app

您需要的看起来像这样:

What you need will look something like this:

Windows.System.Launcher.LaunchUriAsync(new Uri("zune:navigate?appid=[app ID]"));

其中[app ID]"需要替换为您要安装的应用程序的唯一应用程序 ID.

where '[app ID]' needs to be replaced by the unique app id of the application you want to install.

这篇关于Windows Phone 打开另一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 06:19