27 March 2010

The Long Road to Developing for Android Starts Here

I haven't programmed since my first C program to check local bus times back in College (I did physics and programming was a tiny course in first year). I've always been a little intimidated by code but I've decided to take the plunge and I want to write apps for Android.

The first step of course is to learn how to program in Java. I picked up a great e-book on the Android Market:



I can tell you that the $5 are definitely worth it; while there are a lot of free online resources, I've found this book to be very clear with good explanations of the concepts.

I've been reading it for almost a week now and trying out all the tutorials. For further tutorials I've been using the course notes from MIT OpenCourseware for Java beginners.
So far I've only built a few "Hello World" type programs and a few unit converter type programs. Most of them I run in command line (I'm using Ubuntu 10.4 but there are JDK's for all the major platforms), but the e-book gives tutorials for GUI "Hello World" programs. I've been using the two together and trying to combine the concepts to get a feeling for Java. In only a week I feel much more comfortable looking at and editing .java files. 

Writing, compiling and running your programs depends on your environment, I am using OpenJDK6, but I'd suggest you go to the Sun site to get instructions specific to your system along with all the required bits and bobs to get started with the tutorials.

Still a long way to go of course, but the resources I've linked to above have been helping me a lot. If any readers can think of other good resources for the absolute beginner, stick them in the comments and I'll update this post with any I find particularly useful.

UPDATE: For those like me on Ubuntu 10.4 (Lucid) you'll need to add a source to your package manager to be able to download the Java Development Kit. The following command will add it to your sources list from the terminal:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

21 March 2010

Multi-lingual Keyboard Support in Stock Android 2.1

My second niggling little problem with the stock keyboard in Android 2.1 was that there's no easy way to quickly change the dictionary language. You're obliged to manually change the phone's entire locale. This was a problem for me because I need use both French and English.

Both of these languages are supported phone wide of course so it was a little bit more than frustrating given that it should be relatively easy to implement.

The Options:

  • Third party keyboards: I tried both Better Keyboard and Smart Keyboard, I found them to be great if you want skins and other optional functionality, but for my relatively simple requirement it was overkill, not to mention the need to pay. (I'm not opposed to paying for an app, but I prefer to do so only if I'm gonna use it fully, you can see my installed apps to the right.)
  • Manual Entry: This is not a joke, I really tried this for a few days! I'd type and then add any French words as needed by pressing the manual entry. An operating vocabulary in most languages is much smaller than you might think (only a few thousand, 2,000 should get you by) but given all the different ways of just saying "be" (suis, es, est, etes, sommes, sont) I realised that the whole word/lemma problem is bigger than I thought.
  • Wait: I'd wrongly assumed that any workaraounds would require a rooted phone, something I'm hesitant to do. So I thought to wait until an update would be my only remaining solution.
On the support forums a prolific poster, MidKnyte, sent me to XDA forums where there's a great keyboard port of an HTC software keyboard. It does require a little file editing and activating the ability to install non-market apk's but the instructions are very clear and most importantly for me you don't need a rooted phone.

I've been using it now for about two weeks and while I sometimes find the language switch to be a little slow, it's simple and only needs to be done once per language change. It does switch the keyboard from qwerty to azerty, but I prefer this since it reminds me what language I'm in!

So anyone looking to have a good way to switch languages for free and without rooting: just follow the links!

P.S. The high res version is best for the Nexus, I haven't tried any others, so comment if you use it to let me know!

18 March 2010

Seidio's 2800 mAh Extended Life Battery: ****

There were two little things I didn't really like about my Nexus when I first got over the honeymoon period (assuming I did). I'll be talking about the other in another post, but the primary one was battery life. Now don't get me wrong, it would last a full day under "normal use", normal use being a business day where it stays unused until evening time. (I teach English, the "no phones in class" rule applies to us too!)

Come the weekend, I couldn't leave the house without thinking "Damn, should I bring my charger?" Which needless to say is not the ideal start to a weekend!

I looked around online for a solution and found the Seidio 2800 mAh Extended Life Battery. Around the same time Google made spare 1400 mAh batteries available but I didn't want to have to mess around with replacing batteries half way through my day.

So, here comes the review, drumroll please...

Seidio's customer service is first rate with a lot of customer engagement in forums and a live chat feature available on their website. They replied quickly to all of my emails and even though they're in Texas and I'm in France, I received the package on the morning of the third business day.

The battery itself is great, after about 8 or 9 charges now I can use my phone however I want, lots of maps with gps, WiFi, a few hours browsing and 15 hours after unplugging it I still have about 30-40% left. This post is being written with it.

The cover is less great...

Sure, it has a nice finish, very similar to the original nexus cover.

It's black, not dark grey, which while not to everyone's taste, suits me just fine.

There's a bit of a gap at the bottom third which annoys some but I don't find it too much of a problem. The photos on their site are pretty accurate.

But I worry for the camera. The original back includes a clear lens cover but none comes with the replacement cover provided by Seidio. The camera is recessed enough to prevent scratches but since it's open to the elements, dust becomes a problem.

Taking a photo in daylight is okay but when you use the flash it diffuses off the dust, adding a white glare to the photos. A side by side comparison is below, the first photo is prior to removing the cover and giving the lens a wipe. It's not a major difference but will only get worse with time and wiping the lens directly is hardly an ideal solution.


Both photos were taken within seconds of each other in identical lighting with identical camera settings, don't believe me? Ask the cat. The lens was directly wiped with a lint-free cloth.

Apart from that though, the new back is pretty good. The phone stops feeling like a bar of soap and after a day or two feels right in your hand.

Overall I'd recommend it, but if you're ok with the stock battery for the moment, maybe waiting for an alternative cover that provides lens protection wouldn't be a bad idea.

Overall I'd give it 4/5 stars, but better protection for the camera would improve that score.

P.S. I've reviewed the 2800 mAh battery, but while writing, they've released a 3200 mAh one, since the main gripe is the cover that doesn't change much, but if you try to order a 2800 mAh battery, you will be directed to the 3200 mAh.

EDIT (20/3/2010): While a bit of an inelegant workaround, a bit of insulation tape cut just right and taped between the two holes on the interior of the case prevents the diffusion problem without any external signs visible.

15 March 2010

How to Help Developers

I noticed something when I first went onto the App Market; a lot of 1 star ratings were for bugs in the app. I figured "Uh-oh, there's a dev who doesn't act on their bug reports".

But then, I came across a bug in an app I had downloaded (it would force close at a certain point). So, as the email for every dev is given with the app I sent off an email to report the bug. This was the first bug report I'd ever made on Android. The dev got back in touch within an hour and very helpfully taught me how to get a log* and send it to them to help solve the problem. All told my bug was squashed and I had a perfectly working app in 48 hours or less. Now that's service! 

The dev then thanked me for helping out, explaining that a lot of people just leave a bad rating when a bug crops up. That was weird. It wasn't the first time either, just last week another dev with another app said exactly the same thing after I sent off my log.

The app in question was FaceBook Sync:

As you can see from the screen capture below, both one star ratings are for bugs that maybe could have been fixed had these guys just bothered to send an email. 


This ain't rocket science, if you just thumb your nose, the problem'll never get fixed, if you have enough motivation to bother rating an app then just send the log. If the problem isn't addressed within a few days/a week then you can think about leaving a bad rating. 

The success of any modern phone relies on the success of its third party apps. Android reduces the barrier for app development, allowing more people to innovate and produce apps (hence all of the top-notch free apps) but if people don't submit bug reports, the Market will just be a wasteland of alpha/beta quality projects backed by very frustrated developers. 

So, if you've ever given a one star rating for something that could've been a bug, try to just send an email next time and wait a week or so before your review. 

*If you want to get a log, try this app:
It'll let you collect and send logs, works a charm for me.


EDIT: The developer for Facebook Sync also has a blog post about this. (I only discovered this on 18/5/2010)

14 March 2010

First Post!

Well, here I am on the soapbox, what now?

I first got interested in Android back in 2008 just after tying myself into a two year contract with SFR (~ the French Vodafone) on a Samsung SGH-F490. A decent phone but it became dated pretty quickly, despite its 5 Mp camera°. 

My laptop at the time was on Vista and I got so frustrated that I made the jump to Linux*. I got interested in F/OSS vs. top-down (read: paternalistic) business models and that led me to discover Android just as the G1 was being launched Stateside. 

There was still the problem of that two year contract but as it's coming to its end this April, I finally got my hands on my first piece of Android hardware a few weeks ago... The Google Nexus One. 

I then realised that the people I know fall into three categories. People who:
  1. Know of Android's existence but are total fanbois (sorry Sam, but it's true and you know it!)
  2. Have never heard of it.
  3. Me.
I decided to resolve this with a blog that only one of those groups will likely ever read. I've always been mature that way.

°And it had this really annoying "physical lock"/"touchpad lock" double team that made hanging up on a call like playing with imaginary Chinese stress balls.

*Ubuntu, Mint, Puppy and a handful of others from time to time, I now use both Xubuntu and Ubuntu but suggest Mint to anyone who asks.