Android Workshop at TechHub London 24-25th November 2011

The Android Workshop is coming to TechHub in London, tickets are now available for Thursday 24th and Friday 25th of November this year. It’s a full 2 day introduction covering a huge range of topics, for more info please head over to the site. Sign up fa…

The Android Workshop is coming to TechHub in London, tickets are now available for Thursday 24th and Friday 25th of November this year. It’s a full 2 day introduction covering a wide range of topics from layouts and widgets to styling and database access, for more info please head over to the site. Sign up fast to guarantee your Early Bird price, or add yourself to the mailing list for future events.

Finally there’s the Twitter account @androidws, feel free to shoot over any questions you may have or drop them in the comment form below. Look forward to seeing you there.

Book Review: Android Wireless Application Development

I’ve read a few books on Android development over the last couple of years, so it was interesting to see how this book would compare in style and content. Android is a very fast evolving platform, so it’s always hard for a book to stay up to date. Androi…

I’ve just finished reading through a copy of Android Wireless Application Development (Addison Wesley Developer’s Library, 2010 by Lauren Darcey & Shane Condor). Having read a few books on Android development over the last couple of years, it’s always interesting to see how a book tackles this big, constantly evolving platform. The book covers Android up to version 2.2 and includes access to the online Safari edition which hopefully means they can add a few post-print updates where necessary.

android_wireless_app_dev

To be honest, if you’re just getting into Android development, it’s not so important to learn about the newest additions of the latest and greatest version, just to have a firm understanding of the core components which haven’t really changed all that much. Android 2 covers you for development on all current phones, and your apps can still support Android 3 devices if desired, but if you did want to target Honeycomb tablets, you may want to continue your learning by reading up on topics such as Fragments and Loaders.

What’s inside?

The book sets out to be a fairly complete reference and pretty much runs the gamut. Starting off with an overview of Android, a look at the anatomy of Android apps and an understanding of the component parts that make up a project; it leads on to user interface design, a multitude of common APIs (far too many to list, but this includes subjects like data storage, networking/web, location and multimedia) and then runs through important design principals and more advanced topics such as how to be a good Android citizen and make your app feel fully native. The topic of deployment, signing and testing is covered in depth including selling your app. Finally the appendices collate a lot of information you’d otherwise need to search around for, such as various options and usage of the emulator, DDMS, ADB, Eclipse and a SQL Lite quick start guide.

Reference or cookbook?

Most tech books seem to lean toward either being a pretty dry reference, or a cookbook. By cookbook I’m talking about a collection of short practical examples of specific tasks, and I tend to prefer cookbook-style as I find it more enjoyable to read, with searchable online references filling in the minutiae and specific details when needed.

I think this book is a combination of the two styles. There are a lot of tables outlining the various options around certain functions and classes and also plenty of references. This satisfies the “developer’s library” label. But I would say a large part seems to be presented in the form of cookbook-like recipes, particularly in later chapters. For example “processing asynchronously” which teaches the reader the importance of running code on another thread to keep the UI from being blocked and the dreaded “Application not responding” alert.

Suitable for beginners?

It has a gentle enough introduction to suit most skill levels, but enough depth to provide new information for even the most seasoned Android programmers. I did say it felt more like a cookbook but it is structured well enough to be able to dip into a specific topic and quickly retrieve the example you need without much reading around the topic.

The book does touch on some pretty advanced topics such as OpenGL 3D graphics. If you’ve ever done any OpenGL programming you’ll know this stuff easily fills a book (or 3) itself. But it’s nice of them to include a springboard into this kind of development for those interested in real-time game programming.

Further comments

It was nice to see some time had been put into writing a chapter on the history of mobile development. It helps those new to the field understand just how we got to where we are. Remember WAP? This chapter brought back a flurry of deeply buried memories of J2ME; we live in better times.

Two unexpected (but nice) additions were the chapters on “The Mobile Software Development Process” and “Best Practices in Bulletproof Mobile Applications” which discuss application requirements gathering, documentation practices, testing/QA and all kinds of experience-garnered gems.

All in all this is a bumper book at nearly 700 pages with a massive range of topics covered, a worthwhile addition to the bookshelf.

Android Workshop September 2011 at UpdateConf in Brighton

I’ll be running a 2 day introduction to Android development workshop at UpdateConf in Brighton this September. If you’re looking to get into Android development, this will get you up and running lickety-split. Sign up for updates over at the website and…

I’ll be running a 2 day introduction to Android development workshop at UpdateConf in Brighton this September. If you’re looking to get into Android development, this will get you up and running lickety-split. Sign up for updates over at the website and follow the Twitter account @androidws.

android_workshop_2

If you have any questions about the content anything else, please drop me a comment or tweet.

Jamie Oliver’s 20 Minute Meals for Android is Out Now

Just a quick post to say Zolmo’s latest application is now on the Android Market, and for a limited time at an introductory price. It was a genuine pleasure to work on this, I hope you have a lot of fun cooking great meals with it.

Just a quick post to say Zolmo’s latest application is now on the Android Market, and for a limited time at an introductory price. It was a genuine pleasure to work on this, I hope you have a lot of fun cooking great meals with it.

20mm1 20mm2

Download Jamie Oliver’s 20 Minute Meals from the Android Market.

Android UX Patterns

I just stumbled across this truly excellent collection of Android UX Pattern wireframes and examples. This is certainly essential reading for anyone starting Android development as the official documentation is somewhat lacking here.
http://www.androidp…

I just stumbled across this truly excellent collection of Android UX Pattern wireframes and examples. This is certainly essential reading for anyone starting Android development as the official documentation is somewhat lacking here.
http://www.androidpatterns.com

Android Patterns

Using ProGuard with Android

ProGuard obfuscates and shrinks .apk files, providing some added protection for your app, but you may encounter some problems using it up right now, at least with ADT 9 preview 3.By default ADT creates a proguard.cfg file with every new project, so i…

ProGuard obfuscates and shrinks .apk files, providing some added protection for your app, but you may encounter some problems using it right now, at least with ADT 9 preview 3.

By default ADT creates a proguard.cfg file with every new project, so if you have an existing project just copy it over from a new dummy project. The next step is to enable ProGuard, you do this by adding the following to your default.properties file:

proguard.config=proguard.cfg

(assuming proguard.cfg is the ProGuard configuration file created for you, or copied from a new project, into the project root folder.)

When you export an APK release ADT will now run ProGuard on the code, however if like me you have any spaces in your project folder path it will fail. So for now please avoid any spaces in both your project folder path, and the Android SDK path. I believe Google are looking to resolve this in an update.

If you are using something like remote-stack-trace to receive crash reports you will need to follow the instructions on the Android site for automatically mapping the obfuscated code to make it human readable again.

Applications of NFC Chips

Google recently announced the Nexus S phone, created in partnership with Samsung. This is the latest in the developer phone range, aimed at providing a reference device for the next wave of consumer Android devices running Android OS 2.3 (Gingerbread) an…

Google recently announced the Nexus S phone, created in partnership with Samsung. This is the latest in the developer phone range, aimed at providing a reference device for the next wave of consumer Android devices running Android OS 2.3 (Gingerbread) and higher.

One of the features of this phone is an NFC chip, which is capable of transmitting and reading data at a distance of up to 10cm. It is compatible with existing systems such as RFID tags: tiny, incredibly cheap slithers of componentry able to store information and be embedded in anything from food packaging to stickers.

We’ve not had long to think about the potential applications of wide-spread NFC usage, but I can see this breeding some fantastic new ways to use technology. Last night I visited the London Android group, and a few ideas came to mind on the trip home. These are some potentially common use-cases that we’ll see in the next few years…

PayPal / Visa / MasterCard

This will allow us to pay for goods without physical credit/debit cards, or even send a friend or eBay seller money. For in-store purchases equipment will be in place to swipe your phone against and let you acknowledge the payment, and for private transfers you’d simply fire up the PayPal app and type in the amount you wish to send. The NFC chip in the receiving phone can be “activated” passively by swiping the phones together, or opening the app could enable it for 10-15 seconds. Swipe it over your friend’s phone, their details appear on-screen and you hit “send”. The system will send the money to their registered account. The nice thing about this is that you don’t even need to know the person you’re paying, you could literally transfer money to someone you’ve never met, securely, on the street.

Bar Tab

An NFC chip is embedded or stuck to a table in a bar or restaurant. By swiping your phone you’ll be able to uniquely identify your table, placing orders, requesting service and ultimately taking your phone over to the bar to settle up via an NFC capable payment device such as Barclays PayWave found all over the UK. A white-label app could be used at multiple destinations, acting as central gatekeeper to the UIDs in order to also provide the order and payment systems so the phone owner doesn’t need to download an app per destination.

Social Gaming

There are too many possibilities to mention here. But the way that the Android Intents and Service systems works provides plenty of incredibly hassle-free ways to make use of tag “intents” combined with existing location-based social gaming. You swipe a tag or phone near another and the GameService registers the occasion to whatever ends your game needs. Stealth may even come into it, swiping a phone near another without them realising, alternatively enabling geo-caches with RFIDs for 1 player games.

Lots of fun to be had with NFC, any other suggestions off the top of your head?

Speaking: An Introduction to Android

I’ll be speaking at this month’s London Flash Platform User Group meeting (27th May) on the subject of native Android application development.The presentation will get you up and running from installing the tools to building and skinning applications…

I’ll be speaking at this month’s London Flash Platform User Group meeting (27th May) on the subject of native Android application development.

The presentation will get you up and running from installing the tools to building and skinning applications.

You can sign up to attend and find out more details here.

UPDATE: Recording here. (Volume is very low, so without external speakers you may have trouble hearing).

Nexus One Review

I was lucky enough to receive one of the first waves of Nexus One’s (N1) from Google’s direct online shop. Before I go on, the shopping experience was a little too slick IMHO. I signed in with my Gmail account, clicked buy, clicked confirm and it was shi…

I was lucky enough to receive one of the first waves of Nexus One’s (N1) from Google’s direct online shop. Before I go on, the shopping experience was a little too slick IMHO. I signed in with my Gmail account, clicked buy, clicked confirm and it was shipping, if you’ve used Google Checkout before they will likely have your card details and address. You do have 15 mins to cancel the order though. When you see Google’s ever growing list of properties getting together you can see why they are so immensely disruptive.

So the Nexus One, possibly erroneously construed as the “Google Phone”, when in reality Google have already sold two Android dev phones. The N1 is more like the first of many in a Google Phone shop, which if you ask me is pretty much like Phones 4 U. A way of purchasing a sim-free or network contracted phone from a broker.

I was a little hesitant about this phone, it was invariably going to be compared to the iPhone due to the way it was positioned, the capabilities, the Android market and the form factor (albeit slimmer). So with that on with the review…

Nexus One

Hardware

It has the usual “superphone” (more on that another time) credentials; a large capacitive touchscreen (albeit a much improved OLED), sensors galore, but the most standout feature is probably the 1GHz Snapdragon CPU. It’s a huge risk to put such a beast in a small device with current battery technology. This thing has the potential to drink a lithium ion like a student with a beer bong. The Acer A1 (which I had very briefly) suffers from this, it just cannot tame the CPU to satisfy the tiny battery. It’s not just the CPU burning through electrons, Android itself is architected to be a multi-tasking, never-quit-an-app OS. But I’m pleased to say N1 deals with this well without resorting to task-killer apps. The battery is large enough (but if a 2000mAh came out of course I’d get it), and it managed memory hyper effectively through Android 2.1 and a couple of power management chips on the motherboard.

It’s fair to continue to make comparisons to the iPhone 3GS, there are a few things the iPhone wins out on, which considering it’s an older device is still encouraging, but on the whole the N1 is equally polished, with a super hard yet soft to the touch Teflon coating, it’s what the iPhone might look like if aesthetics weren’t so highly weighted in the design (that’s not a dig, it’s a design philosphy that makes Apple products so desirable). Every lesson and trick learned from building and using the iPhone has been considered by HTC.

The N1 comes with 512Mb of RAM (yep!), but only 4Gb of space on the SD card in order to reduce the purchase cost. The point it it’s a removable micro-SD card, these things already cost peanuts, come in up to 32Gb (for the iPhone comparison), and will continue to fall in price as the sizes go up this year.

The camera is a good 5MP shooter, with intelligent focus, LED flash, and a good lense. I think the one to look out for in this department will be the Sony Ericsson X10, which has all their camera know-how surrounding an 8MP ready to blitz the competition. Without going onto talking about Android itself just yet, suffice to say your immediate sharing options are impressive.

There are plenty of little touches which make it pleasant to use. The myriad sensors; proximity to dim the screen and prevent accidental touches, compass to support immersive augmented reality, trackball which if you ask me provides that essential accuracy required for some tasks which touch-screens can really let you down on, and doubles up as a tri-color indicator for notifications. The combination of these sensors and powerful CPU really starts to make sense when you try applications like Google Goggles. This is a visual search app, you point the camera, shoot, it scans the image for text and details, and will recognise and bring up results for books, barcodes, media, paintings, scan business cards and plenty more. The thing is, it’s so fast, the scan takes several seconds on the Acer, on the N1 it does it in one swipe, and on the N1 it also adjusts the flash brighter and dimmer until it gets a good image.

I had heard of it’s secondary mic, used for noise cancellation, but I didn’t expect to have someone remark on the quality of the call the first time I made one, comparable to a good quality land-line.

Software

Perhaps a killer feature of Android is Google’s role on the net. If you are a Google user, you will get a shockingly good setup experience. I entered my email address and password, it downloaded my calendars, gmail, contacts (with photos and maps) and that was it, setup was 1 click. Even more scary, it also populated my Gallery with live images from my Picasa account, which I use as a backup for Flickr, but I may switch over now.

Android is through and through a web OS. You really get a feeling for interconnectivity between apps and services on Android. Not only does it allow developers to write any app they desire with no approval required, you can write background services, fullscreen apps, widgets or live wallpapers. The OS itself it built on top of a system of notifications and intents that allow these things to communicate and interact in a secure manner. So when you open a photo you get sharing options for all the apps that registered as such, Picasa, Flickr, Email, SMS, from built-in to 3rd party and back again.

For the developers reading this, you can write in Java (optionally using XML layouts), Webkit (HTML/JS/CSS) or native C using the ADT plugin for Eclipse and supplied emulator. However the way it has been built allows you to leverage all the layers below, so you can write an app in JavaScript using Webkit, and embed a Java or native C class exposed as a javascript function, for real number crunching power.

The OS itself is responsive and polished, but it doesn’t do anything to sacrifice what is so important in devices you rely on when you need something done fast, devices such as phones and cars. When designing a touch-screen devices it’s easy to lose speed and efficiency amongst gloss and animation, that’s why the N1 has a Car Home app that provides instant voice enabled access to navigation, search and calling (I’ve heard this app can be launched whenever you put it in a car docking cradle). On top of that every text input is voice enabled, you can speak your search input or SMS messages. This can be a complete joke on some devices, but Google does this on a server, a server that has been learning from millions of Google Voice transcripts the last couple of years, this makes it very accurate indeed.

App-Store vs. Android Market

I can’t believe those professional journalists saying that there’s no competition because the App-Store has ~120k apps, and Android Market only has ~20k… Surely that’s a given because of how long these devices have been out, the Android Market targets a much much wider range of devices from several manufacturers from phones to tablets and TVs, and dare I say a great deal more potential customers than the App-Store. It’s just a matter of months.

The purchase experience is definitely better than the App-Store in 2.1. The Market app (screenshot) itself is much like the App-Store app, full-screen image previews, top free/paid, and purchase is a single click with instant download and install. Apple have the edge on how it looks, but with Market you can purchase a paid app and refund it within 24 hours, this gets around approval/testing because if it doesn’t work on a brand new handset yet you can just refund it, it also means you don’t always need a trial version (however that can be a good marketing technique).

You can of course also purchase direct from developers because you do not have to use Google’s own Market, or you can use some 3rd party markets that have sprung up, in particular for adult content.

So that’s it, a pretty positive review so far. I’ll update if anything changes. HTC are one to watch in 2010 that’s a given. Something that I’ve taken away from this is that we are finally getting to where us mobile-fanatics have been wanting to get to for some time. That was the promise that your mobile would be your primary device, not your laptop or desktop. IMHO, laptops and desktops will be the exclusive domain of software developers.