如何HTML连接到使用PhoneGap的在Android原生 [英] How to connect html to native using phonegap in android
问题描述
我开始使用的PhoneGap
在Android上工作。在 iphone 我们用 phoneGap.exec(classname.methodname,参数)
连接到从HTML本机应用程序。但你怎么能做到这一点在Android的?谁能帮我在这吗?
i started working on android using phonegap
. In iphone we use phoneGap.exec(classname.methodname, arguments)
to connect to the native application from html. But how can you do it in Android? Can anyone help me in this please?
在此先感谢,
Bharath gangupalli
Bharath gangupalli
推荐答案
听起来像是你试图连接到本机插件。该技术一般是在Android一样的,包括原生code,然后调出使用Phonegap.Exec()包装。如果你正在寻找一个样本,从尝试一下吧codeScanner插件,其中包括原生code和JS包装叫出它启动:
Sounds like you're trying to connect to a native plugin. The technique is generally the same on Android, include the native code and then call out using the Phonegap.Exec() wrapper. If you're looking for a sample to start from try out the BarcodeScanner plugin, which includes native code and the JS wrapper to call out to it:
的https://github.com/purplecabbage/phonegap-plugins/tree/master/Android/Bar$c$cScanner
这篇关于如何HTML连接到使用PhoneGap的在Android原生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!