Jquery Mobile Web:是否可以调用本机应用程序? [英] Jquery Mobile Web: Is Calling Native Apps possible?

查看:71
本文介绍了Jquery Mobile Web:是否可以调用本机应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够触摸移动网页上的链接,并让它启动原生移动应用,例如Skype。这似乎是一个巨大的安全问题,但我想知道移动环境是否允许这样做?

I want to be able to touch a link on a mobile web page and have it launch a native mobile App, like Skype, for example. This seems like it would be a huge security problem, but I wonder if the mobile environment somehow allows this?

编辑:是的!有用。对document.window =myapp:// myparam的javascript调用效果很好!或者,例如,以下作品:

YES! It works. a javascript call to document.window = "myapp://myparam" works great! Or for example, the following works:

document.window =skype://;

document.window = "skype://";

技巧是知道应用程序的名称。

The trick is knowing the name of the app.

推荐答案

没有移动网页不允许这样做,但有一些替代方案。

No a mobile web page will not allow this but there are some alternatives.

在构建移动应用程序时,您有3个选择

When building a mobile application, you have 3 choices


  1. 原生应用程序

  2. Web应用程序

  3. 混合应用程序

第一个选项与设备无关,因为您需要专门针对每个设备的程序。

The first option is not device agnostic as you would need to program specifically for each device.

第二个选项不允许您访问Native设备控件(至少尚未使用HTML5)

The second option does not give you the ability to access the Native device controls (at least not yet with HTML5)

最后一个选项是在Native Language中编写一个简单的包装器应用程序并在其中呈现浏览器。这可以实现两全其美。大多数内容都是作为网络应用程序构建的,但某些功能可以使用母语。

The final option is to write a simple wrapper application in the Native Language and render a browser within. This can allow for the best of both worlds. Majority of Content is built as a web app but certain features can use the native language.

以下是两种混合方法

  • PhoneGAP http://phonegap.com/
  • WoprkLight http://www.worklight.com

这篇关于Jquery Mobile Web:是否可以调用本机应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆