JiBX on Android (or any other build-time bytecode manipulating library)


I'm considering the use of JiBX for a project that will have to run on both Blackberry and RIM. While it seems like J2ME use of JiBX has been considered by the community (as per JiBX jira tickets), Android is relatively new.

The question is, therefore, this: has anybody had any success (or issues, for that matter) using JiBX on Android, or any other libraries that need to modify your class bytecode at build-time?

There have been discussions out there about how such libs should be runnable on Android (as compared to those using runtime bytecode instrumentation), but I haven't seen too many reports about people actually attempting to do this.


Yes, I have used JiBX to build a prototype in android application. Once you've added jibx jars as your android project library, they will be packaged to dex automatically. In fact, JiBX binding works fine with Android. I only need to include 3 jars. Jibx-run.jar, jibx-ws-0.9-bata.jar and my genereated binding jar. The android application can then make soap client calls, xml to object bindings are handled by jibx internally.

Ok, so I've decided to just write xml parsing code on top of XMLPull api, without any fancy tricks.

If my schemas get any more complicated than they currently are (and I have time) I'd love to experiment with writing an ANTLR-based XML parser generator to generate actual Java code of the parsers for individual schemas.

At the moment, afaik, java generation for mobile is much safer and better than bytecode-generation for mobile.

To followup on this, i've been using Pulse with some success poweredbypulse.com. Its not the ideal solution but it's been working pretty well for me so far.

By : Naren

This video can help you solving your question :)
By: admin