简体   繁体   English

如何在Cordova / Ionic中打开外部应用程序?

[英]How to open an external app in Cordova/Ionic?

I'm working on an ionic app. 我正在开发离子应用程序。 In my app I want to have a button that will open another app. 在我的应用程序中,我想要一个可以打开另一个应用程序的按钮。 I tested the hyper link in safari and the link opens the app correctly, but when I click the button inside my Ionic app, it's not working. 我在Safari中测试了超级链接,该链接可以正确打开该应用程序,但是当我单击Ionic应用程序中的按钮时,它不起作用。 The Xcode reports Xcode报告

Failed to load webpage with error: The URL can't be shown 无法加载网页,并显示以下错误:无法显示网址

Any suggestions? 有什么建议么?

If you are trying to use externally hosted web application in your cordova application, check out cordova-hosted-webapp-plugin . 如果您尝试在cordova应用程序中使用外部托管的Web应用程序,请签出cordova-hosted-webapp-plugin The plugin enables using content hosted in a web site inside a Cordova application by providing a manifest that describes the site. 该插件可通过提供描述站点的清单来使用Cordova应用程序内部网站中托管的内容。 Also it lets you use the features of Cordova plugins too. 它还使您也可以使用Cordova插件的功能。

But if you are trying to just invoke the external web URL from your cordova app, you can make use of cordova-InAppBrowser-Plugin which opens the web URL inside the app itself. 但是,如果您尝试仅从cordova应用程序调用外部Web URL,则可以使用cordova-InAppBrowser-Plugin来在应用程序内部打开Web URL。

You can also check out cordova-themeable-browser-plugin which is almost similar to InApp browser plugin and provides more control on the browser elements available in the UI. 您还可以签出cordova-themeable-browser-plugin ,它几乎与InApp浏览器插件相似,并提供了对UI中可用浏览器元素的更多控制。 Hope it helps 希望能帮助到你

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

相关问题 如何在 Ionic/Angular 混合应用程序中使用cordova inappbrowser 打开链接 - How do I use cordova inappbrowser to open links in Ionic/Angular hybrid app 如何存储Ionic / Cordova应用程序的连接字符串? - How to store connection strings for Ionic/Cordova app? 如何检测 iPhone X(离子 - 科尔多瓦应用程序) - How to detect iPhone X (Ionic - cordova app) 使用 Cordova,如何在 Chrome 而不是应用内浏览器中打开外部 URL? - Using Cordova, how can I open external URLs in Chrome, instead of the in-app browser? 如何在Windows 8 / Cordova应用程序中打开本地PDF? - How to open a local PDF in a Windows 8/Cordova app? 科尔多瓦无法打开外部链接 - Cordova does not open external link PhoneGap / Cordova 2.3 .:如何在InAppBrowser中打开所有外部链接? - PhoneGap/Cordova 2.3.: how to open all external links in InAppBrowser? 如何使用离子科尔多瓦应用程序对设备上的本地表单数据进行加密 - how to encrypt the local form data on the device using ionic cordova app 如何在cordova / ionic app中放置Google Plus +1按钮? - How to place a Google Plus +1 button inside cordova/ionic app? Ionic / Cordova应用程序:如何在单击按钮时更改为另一个模板? - Ionic/Cordova App: How to change to another template in button click?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM