检查是否已处理Windows.System.Launcher.LaunchUriAsync

时间:2015-11-16 16:05:50

标签: c# windows-phone-8.1

我尝试解决Windows Phone Launcher的问题。 我有应用程序,我想使用uri调用另一个应用程序并传递一些数据。我想知道第二个应用程序是否已启动。如果应用程序没有启动,我想做一些后备。

示例:

bool result = await Windows.System.Launcher.LaunchUriAsync(new Uri("secondApp://data/123", UriKind.RelativeOrAbsolute));

if (!result)
{
    // Opps. The second application is not installed.
    ShowToast("Oops. The applications is not installed.");
    UseInternalTinyFunctionalityInstead();
}

但结果总是如此。即使没有安装第二个应用程序。此外,还会显示Windows消息框"在商店中搜索应用程序?您需要为此任务安装应用程序。你想在商店里搜索一个吗?是的,没有"。

  • 是否可以检查第二个应用程序是否已启动/已安装?
  • 是否可以不显示此对话框?

谢谢。

神话冲刺

0 个答案:

没有答案