Native Sword libraries for Android 3


I’ve spend quite a bit of time recently figuring out the best approach for incorporating some form of Sword libraries1 into my Android application. After an unsuccessful attempt to get the pure Java implementation, JSword, to work2 I decided to see if I could, instead, use the Android Native Development Kit and wrap the C/C++ library in a Java Native Interface.

After doing some digging on the web I found out that Troy over at Crosswire had already begun a project named “bishop” whose aim was to provide a Java native interface to the sword library. Just what I was looking for!

While the process of building the library and corresponding java source files is more than what I want to get into here (though I may later on as I hopefully help contribute to the maturity of the project) I wanted to share my findings with anyone else who, like me, is interested in bringing more open-source Bible applications to the Android platform.

So without further ado; Here is a jar file and corresponding JNI library you can use in your own Android project to harness the power of Sword in your own Bible-related apps.

No related content found.

  1. Sword is an excellent suite of libraries for accessing a large array of Bibles and Bible-related modules stored in an open format. []
  2. The fault here was not with the JSword project per-se, the fault really lies with the limited Java environment provided by the Dalvik JVM. []

Leave a comment

3 thoughts on “Native Sword libraries for Android

  • Gaz

    I stumbled upon this post. I’m keen on trying to get some form of Sword based Android App going, I downloaded the JAR file but have no idea how to get it working. I have little/no experience with JNI, what is the easiest/quickest way to be able to use this JAR? I have imported the JAR and tried to create a

    InstallMgr is = new InstallMgr();
    is.syncConfig();

    But I get UnsatisfiedLinkError, any thoughts?

    • wes Post author

      Join the Sword Developers’ mailing list. There are a couple of people there (including the guy who origionally made it possible to create the JNI code mentioned here) who have since been able to produce a native Java library which looks like it will be better for future Sword development than C-based NDK bindings…