如何在android中使用phonegap将html连接到本机

时间:2011-02-03 07:17:01

标签: android cordova

我开始使用phonegap开发android。在 iphone 中,我们使用phoneGap.exec(classname.methodname, arguments)从html连接到本机应用程序。但是你怎么能在Android中做到这一点?请问有人帮我吗?

提前致谢,

Bharath gangupalli

1 个答案:

答案 0 :(得分:3)

听起来你正在尝试连接到本机插件。该技术在Android上通常是相同的,包括本机代码,然后使用Phonegap.Exec()包装器调出。如果您正在寻找一个样本,请尝试使用BarcodeScanner插件,其中包含本机代码和JS包装器以调用它:

https://github.com/purplecabbage/phonegap-plugins/tree/master/Android/BarcodeScanner