The Register® — Biting the hand that feeds IT

Feeds

Sergey Brin descends from Mount Sinai with Android API

The Ten Commandments or a waste of time?

Regcast training : Hyper-V 3.0, VM high availability and disaster recovery

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.

Agentless Backup is Not a Myth

Latest Comments

That app...I would use that.

As a San Franciscan and soon to be G1 owner, I would actually use that app. Well, even better would be if it pointed to the nearest Republican and nearest Democratic districts. Maybe add total population of the voting district as well?

I'm thinking this could be useful because, to a limited degree, political party affiliation might be a signal for what kinds of shops and services are available in the area. So as I'm driving along I5 (the big-ass freeway that runs the length of California) and I want to find an area that has "my kind" of retail, then I can pull this up and know which way to head. And which way is not so promising.

Great idea, Ted. Make it so!

Mahlen

0
0

@Anonymous from Mars

Agreed. This article was kinda blah. It lacked energy. He didn't even have the energy to learn the bloody API a little better. I was excited to see "Fail and You" come up but this was bland.

0
0

Once again

Epic FAIL.

The prohibition against using contractions exists for the writers benefit too since so few people can use them correctly. Benefit from this.

0
0

More from The Register

Bjarne Again: Hallelujah for C++
Plus: Now officially OK to admit you never used STL algorithms
Interwebs taunt Sir Jony over Apple eye candy makeover
Hey Ive, Ive... add more unicorns, willya?
SCO vs. IBM battle resumes over ownership of Unix
Zombie lawsuit back and wants to suck the brains out of Linux
Red Hat to ditch MySQL for MariaDB in RHEL 7
So long, Oracle! Don't let the door hit you on the way out
Shy? Socially inadequate? Fiddling with your phone could help
App 'tells the brutal truth' about social inadequates' chatup lines
Java EE 7 melds HTML5 with enterprise apps
New release arrives with GlassFish, NetBeans support
Nuke plants to rely on PDP-11 code UNTIL 2050!
Programmers and their walking sticks converge in Canada
 breaking news
'Office Facebook' firm Tibbr wants you to PAY for mobe-meetings app
Great idea. Punters won't cough for it though
 breaking news
The only Waze is Google: Ad giant tipped to gobble map app 'for $1.3bn'
Pac-Man-satnav-ish upstart in bidding war with Apple, Facebook
 breaking news
PM Cameron calls for modern, programmable computers! (We think)
IT education musings to G8 chiefs to mystify IT industry