[liblouis-liblouisxml] Re: Using liblouis within an Android app.

  • From: Keith Creasy <kcreasy@xxxxxxx>
  • To: "liblouis-liblouisxml@xxxxxxxxxxxxx" <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Tue, 22 Dec 2015 13:23:02 +0000

Hi Dave and all.

Basically in order to use LibLouis within an Android app you want to create an
android JNI project. You'll have to use the tool "ndk-build" to bbuild the
native libraries under Linux. This comes with the Android platform tools. There
are instructions at the "Android Developer" site that describe how to create a
JNI project.


You'll also need a Java class to interface with the JNI bindings.


Beyond that you just use it like any Android application. Build and install it
from Eclipse or using the ant command-line tool.


JNI can be pretty tedious but once it is set up with the interface from Java to
the native C JNI interface it works great.


You can probably use the LibLouis Java interface as a model for your Java
interface but you'll probably have to write your own JNI C interface.


K







-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Christian Egli
Sent: Tuesday, December 22, 2015 2:52 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx; Dave Mielke
Subject: [liblouis-liblouisxml] Re: Using liblouis within an Android app.

Hi Dave

On Sat, Dec 12, 2015 at 04:51:34PM -0500, Dave Mielke wrote:
Do you know what needs to be done in order to use liblouis within an
Android app? Is there a Java wrapper for it? If so, does the Java
wrapper need a particular verison of liblouis, and, if so, is a
prebuilt verion of it for Android available somewhere? Best would be if
there's an apk for it.

A few years backs there was somebody on the list that had ported liblouis to
Android. In theory that shouldn't be very hard as it should be quite portable.

There are Java wrappers, the canonical one is probably
https://github.com/liblouis/liblouis-java.

Thanks
Christian

--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse
12, CH-8045 Zürich, Switzerland

For a description of the software, to download it and links to project pages go
to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts: