Professional mobile service
Android
So, you’ve just got yourself a shiny new Android-powered handset. Perhaps you picked up the Motorola Milestone. Maybe you opted for Samsung’s Galaxy i7500. Or did you hold out for an HTC Hero? Whatever you picked, you’ve granted yourself access to one of the most promising mobile platforms around.
But entering the cavernous Android App Market [...]
Mobile
Around two years ago I asked why there weren’t that many successfulJava ME consumer applications that weren’t games. I went on to conclude that the few that were successful were just a window on more open, capable and consistent processing somewhere else.
It’s interesting to see that a number of development frameworks for several development platforms [...]
Android
Over the past few months I’ve been working on the new AppWidget framework that was released as part of the Android 1.5 SDK. I wanted to write a really in-depth widget and share it, so I decided to write a forecast widget.
It offers multiple configurations (both a 2×1 and tiny 1×1), and updates four times daily [...]
Android
If you are interested in Google’s Android, the BBC has just posted an interesting video interview with Andy Rubin, Google’s director of mobile platforms. It shows Android on a 3G device running at 300MHz on a Qualcomm MSM 7200 – the same processor used by the latest HTC (Windows Mobile) Touch devices.
Darren Waters of the BBC [...]
Android
According to reports, over the last few hours the Android store went live showing paid applications to some end users in the US.
Viewing paid listings requires an update to the phone firmware. So far, this only seems to have happened to some phones in the US. My phone in the UK hasn’t updated its firmware [...]
Android
Many applications have to measure time intervals. Android has lots of SystemClock APIs and initially it might be confusing what to use. To measure elapsed time you can use…
System.nanoTime();
An elapsed time timer just calls this twice and subtracts the end time from the start time.
The boom-mobile source code has a great StopWatch class that you can use [...]
Android
There are some types of application where you need to programatically disable the keyguard. It’s also sometimes useful to temporarily do this when you are presenting a demo. com.android.alarmclock.AlarmAlert in the Android OS source code provides and example how to do this…
private synchronized void enableKeyguard() {
if (mKeyguardLock != null) {
mKeyguardLock.reenableKeyguard();
mKeyguardLock = null;
[...]
Android
Some applications need to do clever things whenever there’s an incoming or outgoing call. There’s a great example of this in the source code for ‘five’ (an app providing remote access to your PC’s music collection) where the music PlaylistService listens for incoming calls so it can temporarily pause playback…
TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
tm.listen(mPhoneListener, PhoneStateListener.LISTEN_CALL_STATE);
and…
private PhoneStateListener mPhoneListener [...]
Android
One common requirement I see in specifications is to allow the application to make a phone call. The usual way is to use an intent with Intent.ACTION_CALL.
Here’s an example from com.android.phone.PhoneInterfaceManager…String url = createTelUrl(number);if (url == null) {return;}Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url));intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setClassName(mApp, PhoneApp.getCallScreenClassName());mApp.startActivity(intent);
createTelUrl is defined in com.android.phone.PhoneInterfaceManager
Don’t forget to add…<uses-permission id=”android.permission.CALL_PHONE”/>…to your manifest.
Note also that there’s a reported problem [...]