summaryrefslogtreecommitdiff
path: root/bindings/java-jni/README
blob: e4b89fb9de8bfdf3167af0cfe25b8235e1f6098a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
This folder contains java-jni bindings.  They are 99% generic but have
some Android-specific code which should eventually be removed.  This
includes setting a SWLog::setSystemLog(new AndroidLogger()) and an
org.crosswire.android.sword.* package. This was not changed to
org.crosswire.sword.* because there are conflicting SWMgr, et. al.
classes from the crosswire-java project and the CORBA bindings.
org.crosswire.jni.sword.* is an option but exposing the impl in the
package name is bad practice.  More thought needed.

A make in here should produce the JNI wrappers.
jni/swordstub.cpp is the jni implementation

This make also copies the java src/ files to the ../Android binding folder.
The ../Android binding folder symlinks to the jni cpp file generated here.

There is an Android Studio project there to build the native libs

The steps to build all of this are usually:
1) make in this folder
2) build all in ../Android/SWORD Android Studio project
3) a make in the ../Android/ folder, which finally copies the binary libs
	to the ../cordova/ bindings folder to produce a working cordova
	plugin

Android java bindings can be used after step 2
cordova javascript bindings can be used after step 3

Hope this helps get you started.  Let me know your progress!