Kamil
Kamil

Reputation: 2860

Running JavaScript methods from Java in Android

I am writing application using PhoneGap on Android. I need to call some PhoneGap methods from native Java code. Anyone knows how to do that??

Upvotes: 2

Views: 1335

Answers (1)

davejohnson
davejohnson

Reputation: 1447

If you write your native code as an Android plugin (see an example here: https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner) then you have access to all of the PhoneGap Java classes and can call them as you like.

Upvotes: 3

Related Questions