Community
cancel
Showing results for 
Search instead for 
Did you mean: 
puneet_d_
Beginner
72 Views

How to add and use jar file in project.

I have an payment sdk jar file which I am using in native android project how to add that jar in xdk project. There I am required to call a constructor of a class with some arguments. How to...

Tags (2)
0 Kudos
3 Replies
Swati_S_Intel1
Employee
72 Views

You cannot include a jar file in the XDK project. The XDK project runs as an HTML5 project inside the webview of a device. To run native code you have to create a plugin and expose the functionality of your native code at javascript layer. You can find examples of the plugins under plugins management,  "Get Documentation" link on any of the plugins takes you to plugin's github repository where you can see how plugins are implemented or see this Cordova Plugins Development Guide.

puneet_d_
Beginner
72 Views

Is it possible to create plugin of a jar file. I am trying with BillDesk payment gateway and I am just having its .jar.

Swati_S_Intel1
Employee
72 Views

You cannot use .jar as is as a plugin. You might be able to use a java decompiler and reverse engineer the jar. Ultimately you have to put together a plugin with Java source code (for Android) and expose it at JavaScript layer.

 

Reply