简体   繁体   English

Windows Phone应用程序的通用链接

[英]Universal links for Windows phone app

I am using ionic to develop my application and need a feature in which " an URL when clicked should detect whether app. is present or not-- If not re-direct to browser web page.". 我正在使用ionic来开发我的应用程序,并且需要一个功能,其中“单击URL时应检测是否存在应用程序-如果不重定向到浏览器网页”。 I am able to achieve this for Android and iOS with the help of cordova plugin. 我可以借助cordova插件在Android和iOS上实现这一目标。 This plugin does not support Windows phone. 此插件不支持Windows Phone。 How to do this for Windows phone ? Windows手机如何执行此操作?

If I understood you correctly, you are talking about URI associations for Windows Phone 8 . 如果我对您的理解正确,那么您正在谈论Windows Phone 8的URI关联

Shortly, you should create specific URI (calling protocol) for the target/wanted application, and call Launcher.LaunchUriAsync(target_app_URI); 不久,您应该为目标/需要的应用程序创建特定的URI(调用协议),然后调用Launcher.LaunchUriAsync(target_app_URI); If this app already installed, it will be launched and get your parameters (specified in launching URI), if not, WP will open "Store" app and will locate and show target application. 如果已经安装了该应用程序,它将启动并获取您的参数(在启动URI中指定),否则,WP将打开“ Store”应用程序并查找并显示目标应用程序。

So, to achieve your needs, do the following: 因此,为了满足您的需求,请执行以下操作:

  • create your WP app with URI scheme support (ie your own "protocol"), by following MS recommendation from the link above 通过遵循上面链接中的MS建议,创建具有URI方案支持(即您自己的“协议”)的WP应用
  • publish your app on Windows store 在Windows应用商店上发布您的应用
  • add link to your app to html code (here is launch page sample for my app "SilverDict") 将您的应用程序链接添加到html代码(这是我的应用程序“ SilverDict”的启动页面示例
  • tap this link on the phone browser: it will launch the app if installed, or open app page in the store 点按手机浏览器上的此链接:如果已安装,它将启动应用程序,或在商店中打开应用程序页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM