Rien de spécial
Le blog de Régis

More design problems with the Android framework

I already blogged about the problems I encounter when programming for the Android plateform.

Well, my list gets is little bigger now!

Method names made by incompetents

Ce qui se conçoit bien s’énonce clairement;

et les mots pour le dire arrivent aisément. — Nicolas Boileau

And I think many programmers in the Android team don’t understand what they do when I see method or class names such as:

MediaPlayer state is inaccessible

If you use MediaPlayer, you must follow meticulously its internal state, accordingly to the documented state machine. If you don’t, you’ll get an IllegalStateException.

Mediaplayer state diagramm

That’s already a pain in the a$$ to pay attention to a state, but it is even worse when there is no way to get the state of the player! Your application need to maintain the MediaPlayer’s state by implementing various listeners…;