如何从JavaScript中调用Android应用程序 [英] How to call android application from javascript

查看:78
本文介绍了如何从JavaScript中调用Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要调用Android应用程序从JavaScript。

I want to call android application from JavaScript.

推荐答案

其实,你可以调用支持URI方案的数据意图,如应用领域:

Actually, you can call applications that support URI Scheme data Intents such as:

document.location = "tel://0123456789";
document.location = "market://search?q=yoursearch";
document.location = "content://a_file"
document.location = "geo:0,0?q=your+street+address";
document.location = "content://call_log/calls/0"; // must have READ_CONTACTS perm
document.location = "content://calendar/events"; // must have READ_CALENDAR perm

所有的内容提供者应该访问的方式,但您要发送的(可能是浏览器)的意图应用程序必须有正确的权限。

All content providers should be accessible that way, but the application you are sending the Intent from (probably the Browser) must have the right permissions.

http://developer.android.com/guide/appendix/ G-APP-intents.html

这篇关于如何从JavaScript中调用Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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