Thursday, 3 March 2011

The busy coder's guide to Android development 1.1 - bugs or incompatibility

The version 1.1 of this book has been released more than 2 and half years ago. Now they are going for the version 3.5 (released on 26 of Feb of 2011).

Although most of the samples of the books has been rewritten, I think there could be someone else who is also using the book for some reason. Mainly because the samples are still working for Android 2.1.

Incompativility 1
Page 169 -PrefsDemo sample.
At the final of the code, when it is setting the listener for the button, it create a new Button.OnClickListener. It should be View.OnClickListener. The same thing happens in the page 178.

Incompativility 2
In the "try-catch" sentences, the author use a method called "showAlert" which doesn't work. Since it is part of catch, if you comment it, the code will still working.

Incompativility 3
Page 246. For the intents, the name has been changed. VIEW_ACTION is now ACTION_VIEW. Also in Page 251, PICK_ACTION should be ACTION_PICK.

Incompativility 4
Page 251. The method startSubActivity has been renamed by "startActivityForResult".

Incompativility 5
Page 254. For use the ListAdapter, the package android.widget.ListAdapter should be imported. I also have problem when I am creating the class ActivityAdapter(this, i). It seems it has been changed.
TODO: Solve ActivityAdapter (this, i)

About me

I am software engineer and I am working as Android Engineer in Dubizzle (Dubai)

I am very interested in the world of Smart phones because it represents a revolution which is changing the world. I am learning how to program with Android and few times ago, to program with iOS. My intention is have knowledge of both worlds and try to improve que quality of my programs by using the best of them.

About this blog

The purpose of this blog is record all the technic information about all the projects that I have been part, which could be useful in the future. If you have some problem with them, just put some comment.