Few months ago we 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 and Android. 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)  here:
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 all javax.*  packages to javax2.* 
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.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to