Feeds

Sergey Brin descends from Mount Sinai with Android API

The Ten Commandments or a waste of time?

High performance access to file storage

Fail and You If there's one thing that's never affected by economic downturn, it's the mobile handset market. This phenomenon is most evident at the underground parties and dive bars in San Francisco, where it is a well known yet unspoken tradition that in any given group of hipsters, the one with the cheapest phone must always buy the first pitcher of Pabst Blue Ribbon.

We're in the middle of a recession. And Google Android is about to enter a market that's quickly being dominated by a company whose expertise is making cool shit that you think you need. But I'm still absolutely certain I didn't just waste the last six days of my life learning Google's API and writing an Android application.

You Have An API, Now What?

Google released version 1.0 of the Android SDK late last month, and nobody really cared. Someone has to give this thing a little love, though. It's an open API, free documentation, and Google won't hold an iron grip on the application market's balls like Apple does. The main draw, though, is that Google is trying to smooth over a lot of the friction for a developer who wants to get started.

One of the many reasons that programmers love to make APIs is that they get to write code that doesn't actually do anything useful and still feel like they've handed the commandments down to Moses. That is to say, it's easier to draw shit on a white board than it is to write a program that people actually want to use.

With the Android phone, you get all sorts of neat doodads: a GPS locater service, an accelerometer, WiFi, 3D graphics, and a system for playing audio and video. Pretty cool, but what do you do with all that? Sergey Brin wrote a game changing, disruptive application that detects how long the phone stays in the air when you throw it. Fascinating.

Identifying the target market for my application as hipsters who live in San Francisco, I came up with an idea. People in San Francisco have a problem: When they venture outside the city - to Napa for a wine tasting, for example, or to Lake Tahoe for snowboarding - they run a pretty good probability of entering a town where there is a Republican majority. Now, running into someone with an opposing world view is either a blessing or a curse for a San Franciscan, depending on who you ask, but in either case, it would be great if something could notify you when you step into red territory.

Google's phone will have a GPS, and California provides statistics on voter registration, so this is a match made in Mountain View.

Ten Points For Gryffindor

All Android development is in Java, and Google has fortunately provided an Eclipse plugin for their SDK. The integration is very clean, save for some standard issue bullshit you'll need to go through to get JUnit to work with your Android project. If you're going to attempt an Android application without Eclipse, enjoy your bookkeeping: There's manifest files that need to be written, Python scripts that need to be run to generate some boilerplate code, bytecode that needs to be reinterpreted, and a bunch of other shit that you just don't want to deal with.

Google also provides an emulator for the device. As emulators do, this one runs balls slow, taking more than two minutes to start up on my 1.5GHz Athlon. Thankfully, you can keep the emulator running and load new code into it.

The API itself is decent. I only played a couple of rounds of how do I find the objects I need to instantiate this fucking thing, clicking around the Javadocs. I used the geocoder interface along with the location API to figure out what town the phone is in, then cross referenced that with my voter registration data to figure out the probability that any given person you see on the street was a Republican.

Developing the GUI in Android will bring back some horrific memories of Swing programming at first. You can make the whole UI programmatically if you're into that sort of thing, but Android encourages you to use XML to design the interface. It makes for cleaner code and is easier for someone who has had their soul gradually worn down to a nub by web programming for the past several years.

Morph The Screen Into Something Cool

What I had originally set out to do was write an application that runs in the background and constantly monitors your GPS coordinates, reacting when it needs to. Using Google's examples, I wrote a program that can poll the GPS and check your location every time it's run, but the run-in-the-background thing eluded me. I know that it can be done, I just didn't really feel like taking the time to learn Android's whole programming model. Why? Because I'm a hobbyist with a short attention span.

Google's hoping to attract a lot of developers by having an open platform, but I don't think they realize that a lot of developers have better shit to do than tinker around with a cell phone, especially if the tutorial is as much fun as a tax return. Developers are users, too. We need a good interface.

The first part of the tutorial is a Hello, World. Once I get beyond that, I want to do something neat. The second part of the tutorial is a notepad application. Notepad? It's a cell phone with all sorts of gizmos. Show me how to make it beep and shit. The documentation's goal is to remind me why I'm spending my free time squirreled away in the computer room and not sitting on the couch drinking a beer.

In any event, Google's if-you-build-it-they-will-come approach is probably no match for a slowing economy. The phone will be priced at $179, but Google and T-Mobile will likely be able to flood the market and start eating Apple's lunch if they accept collateralized debt objects in lieu of cash. ®

Ted Dziuba is a co-founder at Milo.com You can read his regular Reg column, Fail and You, every other Monday.

High performance access to file storage

More from The Register

next story
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Windows XP still has 27 per cent market share on its deathbed
Windows 7 making some gains on XP Death Day
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
US taxman blows Win XP deadline, must now spend millions on custom support
Gov't IT likened to 'a Model T with a lot of things on top of it'
prev story

Whitepapers

Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
HP ArcSight ESM solution helps Finansbank
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.