使用sendJavascript()的PhoneGap [英] Using the sendJavascript() Phonegap
问题描述
我知道这个问题是高度概括的,而且似乎是不相关的。我自己知道,这种问题不应该问这里。但是,研究时间不长,张贴到PhoneGap的众多高手的博客后,我没有答复他们,我现在已经来到了计算器。正因如此,有没有文件在互联网上的任何地方这种特殊的方式,无论是在<一个href="https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&ved=0CEgQjBAwAw&url=http://docs.phonegap.com/en/1.4.1/&ei=g71oUrTFLYKzrge0-4HoAw&usg=AFQjCNFsaKE3BGtEls-lhoBfog6r8D-kQw&sig2=RUQSGWfiisWwZPOXqzqA9w&bvm=bv.55123115,d.bmk"相对=nofollow> PhoneGap的文档,也不在<一个href="https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CDcQFjAB&url=http://cordova.apache.org/docs/en/2.5.0/&ei=rb1oUpfMCZGzrAe9j4HYAQ&usg=AFQjCNGO5QcxwwzB2nIQTSCapHJcIqUkBA&sig2=Gyy9MDsAL0UwZweoAYPf3A&bvm=bv.55123115,d.bmk"相对=nofollow>科尔多瓦文档。
I know the question is highly general, and seem to be irrelevant. I myself know that this type of questions should not be asked here. But after researching for long, posting to the blogs of many Phonegap masters, I got no replies from them, I have now came to StackOverflow. So much so, that there are no documentation for this particular method anywhere on the Internet, neither in PhoneGap Docs, nor in Cordova Docs.
我的问题很简单。 我想知道,如何使用sendJavascript()在 DroidGap类
或 插件类
调用一个函数在Javascript中
My question is very simple. I want to know, how to use the sendJavascript() in the DroidGap class
or the Plugin class
to call a function in Javascript.
我发现本教程,但它是非常过时的,不与的PhoneGap 3.0工作。这将是非常好的,如果有人提出在本教程的一些修改,或者一些新的方法。
I found this tutorial, but it is very obsolete and doesn't work with Phonegap 3.0. It would be very nice if someone suggest some modification in the tutorial, or some new approach.
我不需要code,告诉我该怎么做。我只是需要一个骨架的
我张贴了类似的<一个href="http://stackoverflow.com/questions/19177991/asynchronous-communication-between-javascript-and-phonegap-plugin">question,实际上它是原来的问题,而我正在寻找解决方案。
I posted a similar question, actually it is the original problem, to which I am looking the solution for.
请给我建议的东西这一点。我会很高兴。
Please suggest me something on this. I'll be very glad.
修改1: 在搜索到的最深的谷歌,我发现这个令人毛骨悚然的方法,这首文档。 <一href="http://raphael-lemaire.com/phonegapjavadocs/com/phonegap/DroidGap.html#sendJavascript%28java.lang.String%29"相对=nofollow>这里是链接
Edit 1: On searching to the deepest of Google, I found this first documentation of this creepy method. Here is the link
推荐答案
在 sendJavascript
函数中定义的<一个href="https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=blob_plain;f=framework/src/org/apache/cordova/CordovaWebView.java;hb=HEAD"相对=nofollow> CordovaWebView 。
每个科尔多瓦插件有一个 web视图
属性,应该给你方便地访问调用JavaScript函数。
Each Cordova plugin has a webView
property that should give you easy access to call the javascript function.
这篇关于使用sendJavascript()的PhoneGap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!