DavidXanatos
DavidXanatos

Reputation: 139

How to make a cordova plugin for android using c++

I would like to write a cordova plug-in in C++ for android. However, all plug-ins I took a look into implement the android part using Java.

For me that's not a viable option, as I need to use some video transcoding/editing libraries.

Is that even possible ? or does the cordova implementation for android require the plug-ins to be in Java?

If it is possible? Are there any plug-ins i could use as sample?

Upvotes: 1

Views: 433

Answers (1)

Simon Prickett
Simon Prickett

Reputation: 4148

You could write the majority of the plugin in C++ and use JNI to call your C++ from Java, then implement the Cordova plugin interface so that the JavaScript calls Java calls your C++ via JNI.

Upvotes: 1

Related Questions