Tuesday, December 16, 2008

Mippin goes Android



I've spent the last 3 days delving into the depths of the Android SDK and you know what? they've been a pretty plesant 3 days. The API documentation takes a little getting used to but when you figure out the best way to navigate it is to use search (I should've figured that one out a little quicker for a google product) it all starts to fall into place pretty quickly. The Android guys have provided a pretty complete set of default widgets and themes to make development rapid and to make your final product blend well into the phones UI.

The result of my time spent on the Android SDK is the Mippin app, which is now in the Android Market Store. That's right I finished the first version of the app yesterday evening and within 10 minutes I'd signed up, paid my $25 to become a registered Android developer and published the app into the Market place, seconds later it was live for download. That was a great experience, so simple, I spent the evening checking my phone every half hour to see how many downloads the app had and to see the comments coming in. In the first 12 hours there were over 3000 downloads - not bad.

As yet I haven't published the source code for the app, but if there is anything in there that you'd like to know how it was done just comment on this post and I'll get back to you. The development process showed that in the end there is usually a pretty simple way of doing each seemingly tricky task, usually I ended up writing many lines of code before realising I could add a single line into an XML file. But here are my top 3 tricks I figured out while developing the app:

1. The translucent blurred background on the keyboard view
This is much simpler than it really should be, Android provides a set of default themes for any View and they can be applied in the AndroidManifest.xml file, this one is android:theme="@android:style/Theme.Translucent.NoTitleBar", like this:

<activity android:name=".TranslucentBlurActivity" class=".TranslucentBlurActivity"
  android:label="@string/activity_transparent"
  android:theme="@android:style/Theme.Translucent.NoTitleBar">
</activity>


2. Get on top of Intents and returning results from them
Intents are one of the keys to happy Android developing. They generally start an activity to complete a task. You can create intents which are set to return values. For example to launch my search box I create this intent from my Activity when the menu item is selected:

Intent intent = new Intent(MipWeb.this,OSKActivity.class);
intent.putExtra("boxtype", TranslucentBlurActivity.BOX_SEARCH);
startActivityForResult(intent, ACTION_SEARCH_BOX);


Then in the activity of the search box I return the search term enter using this code

Intent mIntent = new Intent();
mIntent.putExtra("search", searchBox.getText().toString());
setResult(RESULT_OK,mIntent);
finish();

This sends the result to the onActivityResult() method in the calling Activity.

3. Auto rotation doesn't need to be hard
In the onCreate() method of an Activity just call setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR); this works for all standard widgets that support orientation like the WebView.

happy coding.

Monday, December 01, 2008

T-Mobile G1 Battery Conditioning and Calibrating



The T-Mobile G1 is a great device, a great device with a slightly wonky screen. It maybe new to the market but it is making quite a stir. Often due to its Android OS, but unfortunately its terrible battery life gets almost as much attention. Following a couple of simple steps I'm now obtaining reasonable life from my G1 with it now lasting a day between charges.

There are two issues here, battery meter calibration and battery conditioning - the G1's battery meter seems to come particularaly poorly calibrated, mine was reading 1% remaining when I still had around 15%-20% remaining (use Power Meter from App Store to see the voltages). Maybe it is down to the flexability of the Android OS, maybe not, either way you need to calibrate the battery meter yourself.

To calibrate the battery meter let the phone run down to 0% battery and turn itself off, for the last percent or two don't apply too much load to the device, just let it drain out. Even while using it my G1 hung on to its last 1% of battery for almost 2 hours. Now the battery meter knows the real 0% point. Then get it charging, I'd recommend charging it with it turned off for 5 or 6 hours. I've done this twice now, the second was a couple of days after the first time made the most difference to battery life. This should have now calibrated the meter and conditioned the battery.

I personally wouldn't do this too often, I'm under the impression the Lithium Ion batteries don't like being discharged to this level or at least left in that state for too long - although that may be a myth.

Friday, September 12, 2008

Little Willow http://littlewillow.co.uk

Lisa (my Wife) just launched her baby boutique Little Willow http://littlewillow.co.uk I'm so chuffed for her.

Thursday, August 07, 2008

off topic? slightly, sh*t loads of fun? hell yeah!

My 30th birthday came and went quite recently, and my fab parents bought me one of those Drivers Dream Days - Ferrari 430 vs Lamborghini Gallardo Spyder.



Needless to say it was an absolute blast and I'll never think of these cars in the same light again. But it is true that the Ferrari was far more delicate and 'finger tippy' to control, whereas the Lambo was a seriously planted bit of kit with raw power that inspired confidence.

Here's a little vid of the day...


thanks Mum and Dad :-)

Friday, August 01, 2008

Mobile Geeks of London IV and Brian May

Thanks to Whatleydude for another great Mobile Geeks of London last night. The largest turn out so far, even Brian May (of Queen fame) made an appearence ;-)





Other than Brian, there was a very generous helping of folk from all areas of mobile geekiness, I'm sure Whatley will do some kind of write up on his blog soon.

Thursday, July 31, 2008

HTC Diamond gone wrong







I just turned on our HTC Diamond for the first time in a couple of weeks and this screen came up. Doesn't look very promising :-(



Can anybody help?

Tuesday, June 10, 2008

HTC Diamond Unboxing

The HTC Diamond is the first VGA (480*640 pixel screen) device I've got my hands on. It promises lots with a 3D Touch Flow interface claimed to rival the iPhones.

I qik'ed the unboxing here...



Since then we've got the deivce connected and played about a bit. All in all it is a disappointing device, the UI isn't responsive enough and it is too easy to fall back in to the old Windows Mobile UI.

Due to the addition of the Touch Flow UI, there are a few duplicated apps, 2 web browsers (Opera 9.5 and IE), 2 photo albums, etc...

Friday, February 22, 2008

Can Justin get his SIM in the phone?

or will he be fired?

Motorola really have a lot to answer for...




Wednesday, February 20, 2008

N95 8GB arrives

I had to take my son to the doctors this morning, everything was fine but it somewhat displaced my day. When I finally turned up at work just before midday there was a very pleasant surprise sat on my desk! No it wasn't a pole dancing usb device, or even a Whatleydude with a new Mobster, it was a new Nokia N95 8GB Spiderman Edition

n958gb

Nokia really are getting pretty hot at consumer packaging, I couldn't wait to rip this baby open (although quite carefully as I wouldn't want to effect the residual value).

Taking off the outer Spidey sleeve we are left with a more conventional Nokia box



Flipping the lid on that almost provides access to the showcased device.



Before going any further I should explain what about the N95 8GB has drawn my attention so far from my beloved standard N95. It may be suprising that it isn't the enlarged memory on the new device, I had a large Micro SD card in my old Nokia and I never filled it up. The look and feel of the N95 8GB is great and I love the bigger screen, but the clinchers for me were the widget support, flash-lite 3 embedded in the browser (yes I can now watch YouTube videos live in the webpage on the full youube.com) and longer battery life.

The inclusion of Spiderman 3 was also not a key feature, but it was the first thing I launched on the device. There is a warning associated with the included feature film though, if you upgrade the firmware on your device or reset it to factory settings you will no longer be able to play the movie as you will wipe out the DRM license file. So it is highly recommended that the first thing you do after unboxing the new phone is to peform a complete backup the device, which I do find pretty amusing.




Now I've installed all my favourite apps on the device and I'm ready to go.

Wednesday, February 06, 2008

Geeking it up after Geektails

Whatley, Abul, Ella and Rich(me) geeking it up with qik last night...