开发者

How to connect html to native using phonegap in android

开发者 https://www.devze.com 2023-02-08 01:34 出处:网络
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

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?

开发者_开发技巧

Thanks in advance,

Bharath gangupalli


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/BarcodeScanner

0

精彩评论

暂无评论...
验证码 换一张
取 消