Android-Optimized Joda-Time Library

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Android-Optimized Joda-Time Library

Daniel Lew
I've been musing for a few months on the idea of creating an Android-specific version of Joda-Time.  The main impetus is that grabbing the TZ data out of the JAR causes serious memory issues on Android (, though while I'm at it I'm thinking of a few other tools that can be included for Android.

I'm wondering what peoples' thoughts are regarding the feasibility of this project, especially maintainability of the Android version in relation to the main project.  I want to know if this project seems like a Bad Idea or if there are some pitfalls I can avoid.

Here's a list of goals I've written up:

- Create joda time Android library which can be easily integrated with gradle-based Android build process.

- Create Android Provider that uses /assets/ instead of the JAR for storing TZ data (to avoid memory leaks).  I would set this as the default Provider (rather than ZoneInfoProvider).

- Automatically compile TZ data as part of build process (i.e., can go from source to AAR binary).

- Be able to update Android library along with new Joda-Time source without much fuss.  I don't want to write a library based off of, say, 2.3 then never update it again.

- (Optional) Implement Parcelable serialization for Joda-Time objects, so they can be easily passed between components in Android.  It works well enough to call toString() and parse(), but some performance gains could be made through direct parcelling.

- (Optional) Check for possible memory-intensive Objects and reduce usage (e.g., using one of Android's SparseArrays instead of HashMap).  Not sure if this is necessary at all but if I'm already mucking around with things it might be good to check.

Thoughts?  Suggestions?  Concerns?


Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
Joda-interest mailing list
[hidden email]