Friday, May 21, 2010

libraries in Android : the new feature no body speak about in the SDK

Hi all,

This Google I/O has been rich in announces and new and nice features.

So everybody is speaking about :
*  flash : This is really nice, and a big plus for Android ( no, I didn't mention the Fruit Phone... )
* performances : x2 - x5 for free is always good for developers. It also seems the general OS has been improved in this direction.
* Teethering
* Installation on SD card ( the size of applications will now explode !! )
* Cloud to device messenging : this is like the push function in the Fruit Phone, but one step further, as it use the intent system, and can launch some application from the Cloud...
* Application Backup Data : This is nice. Some developers were already doing it on their side, but having it included in the SDK is really a big plus.


But there is a little new feature that I was waiting for for such a long time, and that is totally unexpected :
The project Libraries !!

Project libraries are basically, Android libraries, with code and resources included.
This is awesome !!

It means that now, we can finally have one common code for a free and a paid application !
In my case, I have 2 different application for the english and the french version of my game, I will now have only one version !

Here is the thing :
http://developer.android.com/intl/fr/guide/developing/eclipse-adt.html#libraryProject

And there is a sample :
http://developer.android.com/intl/fr/resources/samples/TicTacToeMain/index.html

Enjoy !!!

3 comments:

Janne Morén said...

I'm a budding developer (just starting to tinker with my first app), so could you enlighten me? Why do you need two versions, one for each language? Why doesn't it work to simply have your strings as localized resources in the one and same application? At least the small test apps on the developer site that use it seem to work fine.

AndroidBlogger said...

Hi Janne,

You're completly right, one should use strings as localized ressources of the same application.

In my case, my game (wordProspector) is a word game, where you have to find words out of a grid of letters.
So most of the space of the application is the dictionary, so I couldn't afford to have two dictionary in the same application.
And the game was out at the G1 time, where memory was a very precious thing (much more than today... )

Anonymous said...

Hi,

I am Caroline Wall with DZone.com and I recently enjoyed reading this post. I just wanted to extend an invite to you into our Most Valuable Blogger program, which allows our editors to occasionally feature blog posts from your blog on our site under your name. If you are interested in learning more, please contact me at caroline@dzone.com.

Thank you!
Caroline Wall