Archive for February, 2010

An Android Book about UI design

Somethink I really wish it will be released is a book teaching how to design beautiful and user-friendly interfaces for Android. The official docs offer good guidelines, but they are only a good starting point.

Android Tip — Go Fullscreen

In your applications and games, you often have to go fullscreen. Actually, different kinds of fullscreen exist. You may need to remove the title bar only or to get a real fullscreen.

If you want to remove the title bar, but not the Android notifications bar, simply modify your manifest under the activity tag of your XML:


android:theme="@android:style/Theme.NoTitleBar.Fullscreen"


If you need a real fullscreen, then you have to use this code in your Activity class:


requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

Catch USSD responses

Android APIs lack a system to grab the response of USSD codes. Don’t you think this is a bad issue? Without it it’s impossible to make, for example, a program that captures the USSD response for a credit request to the operator, forcing a developer to use work-arounds for the same goal, like web requests. What do you think?

Mobile World Congress 2010 — 60.000 Android terminals sold each day

According to Eric Schmidt, Google CEO, every day in the world 60.000 Android powered phones are sold. This is really great news. Come on, my fellows… let’s fill this Android Market with our wonderful applications and games.

Rokon Game Framework

Android really needs a solid framework. Specifically, a multimedia multipurpose framework. Something to help game developers in their hard work. Rokon Framework is an open source project that aims to that. It started with very few library functions, some months ago, and now it’s becoming something serious.

Give it a look and if you are going to try it, share your feedback!

Note for the Rokon developer: please fix your Wiki page on your site. Your tutorials have been (and they are) inaccessible for days!

Android Tip – Debug or trace messages

Who comes from Java feels pretty comfortable using System.out.println() to output some debug messages.
If you come from Actionscript you certainly use trace() for the same reason.

In Android, the better way to trace messages in the console is the Log class. If you have to output a string for testing purposes, try with:

Log.d(myStringDescription, myString);

For example:

Log.d("Message", "Hello, World!");

I’m sure you are going to be comfortable, once used to it!

Android Tip – How to generate random numbers

In every programming language, you have sometimes to generate a random integer number in a defined range.

Here is how you can do it in Android.

First, declare and initialize the generator:

Random generator = new Random();

Then, get a random number:

int n = generator.nextInt(n);

where n is the upperbound limit.