Gingerbread on HTC Desire

I recently decided to make the jump from Froyo to Gingerbread on my HTC Desire.

The ROM I chose was the excellent Oxygen ROM by AdamG. It’s based off the open source code (AOSP) and has very minimal modifications to add a few often requested features.

Overall it’s amazingly fast. The phone feels so much quicker than it did on Froyo, and that was a big step up. At first I was a bit apprehensive about the black titlebar as I moved away from HTC Sense because I didn’t like the dark look. Overall though it’s perfectly acceptable, just looks a little odd with the light themed applications (like most of Googles apps).

The think I love most though is the lock animation. Hard to describe when when I first saw it after flashing the ROM I just loved it.

More information and screenshots

Posted in Android | 1 Comment

Reusable TitlebarActivity

One of the UI guidelines which Google made use of in their Twitter application is the Titlebar UI element.

The premise of the titlebar (Actually called Actionbar by Google I think) is that it replaces the default titlebar with a bar that is standard across the whole application. It will always have the same buttons (refresh, search, tweet etc.) and is not context sensitive (never changes).

Some applications have started using this UI element, however some don’t do it quite how Google explained it. The Facebook one for example changes depending on what activity you are on. The button to create a new status message seems to appear and disappear on different activities almost at random. Even the search button doesn’t stay in the same place constantly.

I’ve tried with my upcoming Madlab application to keep to this UI guideline as much as possible. To help with this I’ve come up with a way to almost force me to do this. It involves extending the Activity class with one I’ve called TitlebarActivity. This extends the Activity class by adding a method called setupTitlebar. This is called in the onCreate of the Activity which implements it after the content view has been set (it needs to do this to get access to the views used in the titlebar). All that needs to be done then is to create a layout file for the titlebar and then include it in the layout of any activity which makes use of TitlebarActivity.

The code is fairly simple to read, however at the minute there’s a lot of stuff in TitlebarActivity which needs to be removed or replaced. The way the passing of states works isn’t right and is sometimes causing some problems.

You can view the code in the Google Code project I’ve setup for this application. When the project is closer to completion I’ll most likely modify the TitlebarActivty class so it can be used in other projects more easily.

Posted in Uncategorized | Leave a comment

adbWireless is great!

If you develop on android you must know how annoying it can be sometimes to have to have your phone plugged into your computer via USB just to debug an app on it. Sometimes you might not have the cable with you, or maybe you just can’t be bothered to find it.

Thankfully I’ve found adbWireless (spanish). For anyone who has a rooted phone you just need to install this app from the market and then run the command it shows on the screen. The command is for adb on your computer and tells it to connect to a device on the network.

All you need to do is make sure your phone and computer are on the same local network, which does mean that you need to have wireless on all the time to use this app. However, for most situations this is perfectly fine.

Hopefully it’s useful to you. I plan on using it when I’m at Madlab so I don’t have to carry yet another cable with me in my bag :)

Posted in Android, Coding | Tagged | 1 Comment

Camping with a smartphone

There are many situations a smartphone is perfect for: entertainment on public transport, music while walking, constant email updates and even a quick gaming session in a particularity slow lecture (not that I’d do that of cause). One thing it’s probably not designed for in camping.

The first consideration when taking my  smartphone of choice (the HTC Desire) camping was how to keep it going for the whole 4 nights. With a normal phone this would be no problem at all. You might have to dim the screen and use it a bit less for texting but most features phones will last no problem. Only at a push though can you make a phone like the Desire last around 2 days.

I went through the process of making sure I used as little power as possible. I turned off anything that wasn’t needed including WiFi (obviously, I was in a field anyway), GPS (sometimes turned on when out and about to find where we’d got lost at this time) and dimming the screen to the lowest setting. I also made sure to turn of syncing (no email/facebook/twitter sync at all) and tried to minimise the number of running services using a task killer (yes I know, this is bad). Overall this might give me a day and a half under low usage. At this point cell standby was the single biggest batter drain, so at night I turned the phone to airplane mode. I didn’t turn it off completely because I don’t own a watch (and don’t really wish to) so my phone is the only way I tell the time in the morning.

This might have given me just enough power to keep the phone going for the full 4 night, however I came up with a better plan.

I brought a cheap car kit from Mobile Fun. It cost me less than £20 and included a very nice and extremely adjustable holder which is now a permanent fixture in my car. It also, crucially, had a car charger which plugs into the cigarette lighter and at the other end just plugs straight in the phone. You can get other car chargers which instead of having the wire to the phone permanently fixed just have a USB socket to change any gadget you can think of. For me though, the cheap one in the car kit worked fine.

Will this I could then use the phone pretty much as normal, just with all the settings set of minimal power. With a fully functioning smartphone I used it as a satnav system, found local restaurants and attractions, found directions and prices to park and rides in Bath and Bristol and use it as a camera.

To me a smartphone is a great tool while camping, however battery life is a major issue. Hopefully we get phones that can last 4 days (or maybe even a week) soon. As power requirements go down and battery technology improves it can only get better.

Posted in Android | Tagged | 3 Comments

Better QuickActions

Just a quick post. I’ve found a better version of the QuickActions project that I posted about a week or so ago. This new version is a modification of the original one by Lorenz.

The modification adds the same style that the QuickAction dialogs have in the Twitter and Contacts app, as well as how it looks in the Gallery 3D app.

Take a look and make sure to thank the person who modified it.

http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/

Posted in Android, Coding | 3 Comments

Backups

Everyone always says that backing up work is an important thing. The problem I ran into was when I decided to commit my files to SVN to make sure I always had it copy the SVN client (the one built into eclipse) crashed and somehow managed to delete all the project files with no trace of them via extundelete.

Thankfully I was in the process of rewritting it all anyway so I’ve only lost a few bits of important code that I wanted to keep, the rest I’ve starting rewriting this morning.

If you want to take a look at the project you can find it over here. Nothing much interesting in it at all at the minute though.

Posted in Coding | Tagged | 4 Comments

Implementing Quick Actions on Android

If anyone hasn’t had a look at the official Twitter app on Android yet it’s well worth a look. It’s one of the best designed applications on the Android platform and shows what all applications should be like.

There is one part of the app I really like: the Quick Actions menus.

Quick Actions first come about in Android with the introduction of Quick Contacts. Normally you press on the avatar of a contact and a Quick Content box will open listing all the different actions you can take to do with that contact (Email, message, call etc.).

In the Twitter app they are used as a replacement for the long press on list items by pressing on the more arrow on the right of each tweet, and as a replacement for tabs using a drop down menu in the top left.

Unfortunately there is no code in the android SDK to make implementing Quick Content boxes simple, you basically have to roll your own. This is what I thought until I stumbled across a great project on Google Code called simple-quickactions. As should be obvious from the name, it provides a way of implementing Quick Content very simply as most of the code has been written before. The style of the boxes is just plain but this allows you to easily customise it to fit in with the rest of your application.

The best bit is it will work on Android 1.5 and above with very minor modifications. All I had to be was remove the @Override annotations, but I think there will be a better way to modify it to work.

I’ll be using these in an upcoming project of mine and I look forward to seeing how many other apps start making use of this great UI pattern.

Posted in Android | Tagged , , , , | 1 Comment

Android 2.2 (Froyo) for the HTC Desire with Sense

I’ve finally got round to rooting my HTC Desire and installing a custom rom on it. The one I went for is the newly released DJ Droid, which is based off Android 2.2 (known as Froyo) but also has HTC’s custom Sense UI improvements on top of it.

From what I can see it’s a build that comes from inside HTC itself and has just been modified to get rid of watermarks and the like. This means it’s not a final built and apparently has a few stability issues. I’ve yet to find any though, and it’s been absolutely flying for a few hours now with no force closes.

There are a few new bits in the user interface:

  • The messaging app has a new look as well as a bit of a refresh for the HTC keyboard

  • The Gmail app now looks horrible. There’s a thin white border around the black of the title bar and just looks bad. I’m going to guess that this is just a bug though and won’t be like this in the final release

Screenshot of the gmail android 2.2 app

  • There is now a flashlight app which turns on the camera flash on the back of the phone. It has 3 different getting and can also be set to flash at a regular interval and also display an SOS pattern

Screenshot of the new HTC Froyo flashlight

  • You can now turn the phone into a WiFi hotspot and use it to get your laptop in the internet. I can see this being useful when you don’t have the USB cable to do internet sharing (or when multiple people need to use it) but it will kill the battery very quickly (not tested this, it’s just an assumption)

  • In the settings there’s now options to do with a car dock. I don’t remember seeing these before. The car dock home application is also included (at least in this ROM it is)

  • There are also a few new setting widgets for you to place on the home screens. They can control the sound profile, the ringtone and new features like the wifi hotspots. One that I wish was there would be enabling and disabling auto rotate

One of the other features I’ve been using is the new Cloud to Device API (C2DM) which was demoed at Google I/O this year. Personally I think this is a great technology. It’s what was lying under the Gmail push for a while, the only difference now is that it has been opened up for any developer to use it. It required Android 2.2 and was the main reason I’ve decided to use this ROM. I’ll likely post something once I’ve had a bit more of a play with it.

If anyone wants to have a go with this ROM (it really is worth it) the  first you need to root your device. I used this video guide to make the gold card and do the rooting. You then need to get fakeflash installed and then you need to follow the instructions to install the DJ Droid ROM.

That may seem like a lot of steps but over all it took about an hour and was well worth it. It gave me a ton of new features and has improved the speed of the phone, even though it’s alpha grade software.

Posted in Android | Tagged , , , | 1 Comment

Sony Ericsson Developer Tutorials

Found another great resource for android development. Sony ericsson have started releasing tutorials about how to make some fancier UI elements such as one finger zoom and a 3D ListView.

Take a look

Posted in Android | Tagged , , | 1 Comment

Great Android Developer Links

I’m really getting into developing applications on Android right now. Here are some great links that I’ve found that helped me greatly:

Posted in Android | Tagged , , | Leave a comment