[英]Use Windows.System.Launcher.LaunchUriAsync to launch Notepad in UWP
[英]LaunchUriAsync() doesn't launch Windows Store App
我正在尝试通过LaunchUriAsync()在OnShareTargetActivated()方法上调用我的应用程序,但是它不起作用。
我在appmanifest中有一个名为“ myapp”的协议。 当我在文件资源管理器上放置“ myapp:// test”时,我的应用程序启动了,但是当我这样做时:
protected async override void OnShareTargetActivated(ShareTargetActivatedEventArgs args)
{
Uri uri = new Uri("myapp://test");
await Windows.System.Launcher.LaunchUriAsync(uri);
}
当用户单击“共享”中的“魅力栏”选项上的我的应用程序时,会发生这种情况。 但是该应用程序永远不会启动。
共享应用程序示例( http://code.msdn.microsoft.com/windowsapps/Sharing-Content-Target-App-e2689782 )
您应该检查共享的格式,Metro只接受某种类型的内容共享,共享格式为Text,uri,Bitmap,storageitems,Html
如果您觉得有用,请接受作为答复
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.