Random header image... Refresh for more!

Posts from — December 2010

FULL OF WIN

Oh yeah.  That’s right.  Built in.

December 6, 2010   No Comments

Android UI XML Reminds Me Of XAML.

There, I said it.  XAML!

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
   <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello"/>
</LinearLayout>

(Not that there’s anything wrong with that.)

December 6, 2010   No Comments

But I Don’t Wanna Install Eclipse…!

Last week, I got an Android phone, the Droid X.  I want to try developing on it, because I have a few ideas for programs I’d like to have in my pocket all the time.  Ideally, I’d do it all in a “Crazy Weekend Project” format, unfortunately, I don’t seem to have to ability to dedicate five days in a row toward a single goal right now.  ((Half of it is the after effects of moving to a new house earlier this year, the other half are called the Wii and the XBox360 and my general video game obsession.))  I do, however, have bits and pieces of time here and there that I can use.  I know that if I don’t force myself to get started on something, I never will. 

Just ask that Mac Mini I bought in April in order to try iPhone/iPod development.  It’s still sitting unused in its box, waiting for a Crazy Weekend Project that’ll probably never come.  ((After all, there’s no Haggle to write a Haggle app for anymore…))

So, here I am, just getting started and making it happen.

But…  I don’t wanna install Eclipse!

You can’t make me!

Please…  Please don’t.

Ah crap.

I had to use Eclipse at work years ago.  It could charitably be described as “broken” on a good day.  Now, to be fair, I’m not sure where the brokenness came from, whether the program was just bad or if it was a side effect of the fact that my installation was a directory copy from a co-worker’s machine.  Either way, it didn’t work.  At one point I tried switching projects and it freaked out and lost the entire concept of packages.  It took me two hours before I was even able to convince it that it understood Java code.  I also remember searching being extraordinarily painful, but I don’t know why.

On the other hand, at least I won’t have to write Objective C.

Yes. I own a copy of NeXTstep. nerdScore++;

It’s not just Eclipse.  It’s JDKs, JREs, AVDs, SDKs, ADKs, MREs and STDs.  The quick start here has pointers to the stuff you’ll need:  http://developer.android.com/sdk/index.html

Of course, it’s open source documentation which is usually awesome in the way it leaves out important information and glosses over critical steps.

Step 1: Easy.

Step 2: Easy.

Step 3: WTF?

The quick start goes very sideways here at step 3.  It tells you to “set up a remote update site”.  Which would probably be easy, if such a thing existed.  But it doesn’t.  You can look through all of the menus and property items in Eclipse, but it’s not there.  What they mean by “remote update site” is that you should go to “Help->Install New Software…” and put that URL in there.  After that, make sure the box next to “Developer Tools” is checked and go through the wizard to download and install those packages.  Once that’s done, go to “Window->Preferences…->Android” and set the SDK path.

Step 4 is also a bit on the wonky side, but with enough fiddling, you’ll probably get it sorted out.  You see, even though you just spent twenty minutes installing and configuring Android SDKs, you still don’t actually have the SDK for any of the Android platforms.  You still have to download and install those packages, too.  To do that, go to “Window->Android SDK and AVD Manager”, then select “Available Packages”.  You should have a tree that you can expand and see various packages that you can download.  At a bare minimum, you’ll need to pick one of the “SDK Platform Android” versions, probably either the latest one or the one that matches your device.  I think the Google APIs are needed for maps and some of the other Google tools, but I haven’t played around with any of those yet.

Now you’re probably ready to go.  You should be able to create a new Android project.  I have no idea what any of the fields on the wizard are, so I’m not going to bother attempting to explain them because I’d probably be wrong.

Once I created the project, I immediately got an error about R.java not being found, even though a quick check through the package manager showed that it’s there.  ((Looks like it might be Eclipse that’s broken after all…))  A Project->Clean… took care of the problem for me, and then I was able to build ((No CTRL-SHIFT-B!  ARGH!)) and run the sample project.

Well, at least, that’s what you’d expect to have happen, but nope.  See, there’s no Android Devices to run it on.  ((Never mind that it would probably be fairly easy to include a reference device or two, this is Open Source, why do anything for the user if the user can ./configure, make, make install and make configure it for themselves?))  You have to set up an emulator AVD before you can begin.  Go back to the SDK and AVD manager and click “New”.  That’ll pop up a dialog where you can give it a name and specs.  Several warnings:

  1. The Name can’t have spaces.
  2. It appears to pre-allocate the SD card file, so don’t create a 16384 MB (Sorry, MiB…) SD card like I tried to do, or the process will kick off “mksdcard.exe” which will take forever and fill up your hard drive.  I went with 256MB.  I know know if that’s too small, but whatever, I’ll find out later.
  3. Under hardware, you’ll want to enable some of the hardware bits you might want to develop against, although I’m not quite sure yet just how exactly the emulated GPS or accelerometers are supposed to work…
  4. No, I have no idea what in the hell “Abstracted LCD Density” means.

After you hit “Create AVD”, it’ll churn for a bit and give you an emulator image you can use.  And, of course, nothing has changed since my days on the Windows CE team ((Platform Builder test team, WinCE 5.0 and Windows Mobile 5, 2003-2004, mostly focused on the CE emulator integration)):  Mobile Device Emulators are slow.  Really really freaking slow.  It’s usually faster to use a physical device, if you dare.

After a very long boot process…

…your program will run and do this:

Well, it looks like I’m off to a good start!  ((BTW, I don’t actually have any idea what I’m doing, so if you’re looking for help, you’re probably in the wrong place…  Don’t try any of this at home without getting a second opinion first.))  Can’t wait to see what’s next!

(As this isn’t a Crazy Weekend Project, don’t expect frequent updates.  In fact, don’t expect any updates at all, that way if I’m distracted by Shiny Thingsâ„¢ and never come back to this, you won’t be waiting around forever…)

By the way, while you’re in the emulator, play around and you’ll find interesting things.  Like this:

I NEED THIS ON MY PHONE!

December 5, 2010   No Comments

Electric Curiosities: “Le Stick” Joystick Box

I’ve talked about Le Stick before, in a post I wrote about motion controllers from the early days of gaming.  It’s a slightly-phallic looking gravity controller, presumably using mercury switches or something like that to sense orientation.  Tilting it forward is like pushing up on the joystick, tilting it left moves you left and so on.

At least that’s the theory.  In practice, it’s more like you’re trying to play a game while having a seizure.  Up moves up and down moves right, and your character flails wildly in circles until it dies.  It’s a terrible controller.

I, of course, had to buy two of them.

But then, one day, I stumble across one that’s still in its box.  I don’t really need a third, but come on, IT’S GOT THE BOX!  I put in the minimum bid, wait three days, and it’s mine.  I didn’t know what I was in for.

It’s for the Atari 400/800, Atari 2600, and the Commodore Vic-20.  Apparently it once sold for $38.95, and I feel very, very sorry for the guy who shelled out that kind of cash in 1981 for this thing.

It certainly is “remarkable”.  It’s just that the remarks are generally sarcastic and negative.

LE STICK

The ultimate goal in microcomputer hardware.  Add more control and realism to your personal computer or home video game. ((More control?  No.  And realism?  It’s still an Atari 2600.  It doesn’t change the fact that you’re playing a medium-sized square that shoots small squares at big squares.))

With simple one-handed movements, you can maneuver your sights in any direction you want.  ((I want to manuever my sights down.  Not right.  DOWN.  And you won’t let me do that.)) The large red push button on top provides a quick and accurate firing mechanism for better response time.  ((You’re bragging that your joystick has a button?  Okay…))

LE STICKâ„¢ will eliminate all the frustrations you experience with conventional joysticks or keyboards.  ((…while simultaneously introducing you to exciting new frustrations never found with conventional joysticks or keyboards.))

LE STICKâ„¢, the joystick of the future.

It’s gotta be good if it’s FROM THE FUTURE!

Wait…  Scratch that.  If this is the joystick of the future, I don’t want to see the future.  Please stop time so that I can stay here, where joysticks don’t suck.

LE STICKâ„¢ Features:

Easy to grip handle

One-handed operation

Motion detectors to sense hand movements

Large push button on top

“Squeeze-switch” to freeze motion

So far, this has all been typical marketing copy.  Nothing really special.  Although, I have to say that I wasn’t aware that there was the squeeze switch feature until I read this, not that it helps at all.

But then I looked at the artwork on that last panel and…  O M G

I say again:  OMG

Wow.  That has to be unintentional.  They couldn’t have actually…  Could they?  No, no…  I mean…  Really?

Really?

The hand even has hooker nails!  OMGLOLWTF.

It’s like the prototype was sent to the artist who had no idea what it could possibly be, so they assumed that it was some sort of high-tech marital aid and illustrated accordingly.  I mean, yeah, the thing is vaguely phallic in appearance, but I never thought they’d take it that far.

Of course, you really have to see the picture and the text together to get the full experience…

Well, I guess if the joystick is that bad, you gotta do something to get people to buy it…

December 5, 2010   4 Comments