IONIC:在移动应用程序中打开网页链接
IONIC : Open web links in mobile app
我有一个 IONIC 应用程序。我希望我的用户使用 https:// 或 http:// 共享 links。应该在我的本机应用程序中打开。如果应用程序未安装应该让我从 Play 商店安装它。
我试过了https://github.com/EddyVerbruggen/Custom-URL-scheme
但是当我点击 https:// url 时没有任何反应。它仍在我的 chrome 浏览器中打开。我应该只在我的应用程序中打开 link。
我想要完全相同的解释:https://paul.kinlan.me/deep-app-linking-on-android-and-chrome/
Eddy 的插件专门用于自定义 URI 方案。这是您看到的 myapp://
格式,正如您所指出的,它不允许 http://
或 https://
链接。
Paul 在 Chrome 团队工作,因此他的文章专门针对 Chrome 意图。这是一个不错的标准,但仅适用于 Chrome,如果您希望在其他地方兼容,则不是特别有用。
App Links 标准旨在解决此问题,但它仅在较新版本的 Android 上受支持。
相反,您需要的是 hosted deep links. With this set up, your https://
URLs lead to webpages that redirect to your custom URI scheme, which opens the app and deep links your user. You can technically build it yourself, but most developers don't. Services like Branch.io(完全披露:我在 Branch 团队)和 Firebase 动态链接让这个过程变得更容易。
以下是 Ionic 的各种深层链接选项的细分:https://blog.branch.io/how-to-deep-link-in-cordova-phonegap-and-ionic/
我有一个 IONIC 应用程序。我希望我的用户使用 https:// 或 http:// 共享 links。应该在我的本机应用程序中打开。如果应用程序未安装应该让我从 Play 商店安装它。
我试过了https://github.com/EddyVerbruggen/Custom-URL-scheme
但是当我点击 https:// url 时没有任何反应。它仍在我的 chrome 浏览器中打开。我应该只在我的应用程序中打开 link。
我想要完全相同的解释:https://paul.kinlan.me/deep-app-linking-on-android-and-chrome/
Eddy 的插件专门用于自定义 URI 方案。这是您看到的 myapp://
格式,正如您所指出的,它不允许 http://
或 https://
链接。
Paul 在 Chrome 团队工作,因此他的文章专门针对 Chrome 意图。这是一个不错的标准,但仅适用于 Chrome,如果您希望在其他地方兼容,则不是特别有用。
App Links 标准旨在解决此问题,但它仅在较新版本的 Android 上受支持。
相反,您需要的是 hosted deep links. With this set up, your https://
URLs lead to webpages that redirect to your custom URI scheme, which opens the app and deep links your user. You can technically build it yourself, but most developers don't. Services like Branch.io(完全披露:我在 Branch 团队)和 Firebase 动态链接让这个过程变得更容易。
以下是 Ionic 的各种深层链接选项的细分:https://blog.branch.io/how-to-deep-link-in-cordova-phonegap-and-ionic/