2

What I have understood is through phonegap plugin you can invoke native APIs.

http://docs.phonegap.com/en/2.1.0/guide_plugin-development_android_index.md.html#Developing%20a%20Plugin%20on%20Android

Question:

Is it possible to invoke C++ function directly from phonegap, as my middle lever layer is going to be c++, and applicable for both iOS/Android.

Whoami
  • 13,254
  • 17
  • 81
  • 133

1 Answers1

3

No, not directly. You would have to write a plugin that calls your C++ code. On Android you'd be writing a plugin in Java and using JNI to call your C++ lib. On iOS your created your plugin in Obj-C and call your C++ code. Here is a good SO answer on it https://stackoverflow.com/a/4456290/41679

Community
  • 1
  • 1
Simon MacDonald
  • 23,243
  • 5
  • 57
  • 74