Dear all,
Few months ago me and my research team were involved in a project using
ontologies on Android-based mobile devices. We firstly tried the
Androjena project (http://code.google.com/p/androjena/) but it's
development is almost ceased and it supports only a subset of the Jena
features. Therefore we tried to use the full Apache Jena project on
Android. While the project is not directly working, we analyzed the
issues and we came out with a fully working copy of Jena on Android.
We think that the process for getting Jena working on Android might be
of interest for the development community of Jena. More specifically we
would like to inform you about the issues preventing direct adoption of
Jena in Android and the solution we applied, hoping that they might be
integrated in the full Jena release in a near future.
You can find a Jena version working on Android (4.x) at:
http://elite.polito.it/jena-on-android
while in the following we describe the issue preventing direct adoption
of Jena in Android.
The Jena framework defines some packages (mostly inherited from
dependencies, Xerces, in particular) by using the namespace javax.* .
Such a namespace is currently interpreted by the Dalvik cross-compiler
as belonging to the "core" java library, thus not being "safe" to
cross-compile. The result is that the code containing such packages is
not cross-compiled unless the compiler is set in "core-library" mode
which results in a compiled code that will probably cease working after
system updates and that, as the cross-compiler warns, " will ultimately
lead to pain, suffering, grief, and lamentation."
Actually the packages are not part of the java core library therefore a
simple re-factoring solves the problem. In the specific case, we
downloaded the last sources of xerces, refactored alljavax.* packages
tojavax2.* and re-packed the library, and everything worked perfectly.
This, by the way, enables the full Jena framework on Android, with the
ability for developers to just include the needed modules as it is
currently done in typical Java applications.
Hoping to be of help in adding Android support in Jena
Best regards
Dario Bonino
--
Ing. Dario Bonino, Ph.D
Post-doc researcher @ PoliTo
e-m@il: [email protected] / [email protected]
www: http://elite.polito.it/people/bonino
<foaf:Person>
<foaf:firstName>Dario</foaf:firstName>
<foaf:surname>Bonino</foaf:surname>
<foaf:msnChatID>[email protected]</foaf:msnChatID>
</foaf:Person>