Archive for September, 2009

Android Day 2

Wednesday, September 23rd, 2009

Found a blog with the answer to my namespace conundrum from Day 1, they suggest using the name of your website followed by the application name, in my case “rxkinetics.abpk”. Simple, but not intuitive (or explained in other tutorials).

Started learning XML UI layout. Found a great tool called ‘DroidDraw’ to help with the tedium of drawing and placing all the elements on the Android screen.

Then I got side-tracked for hours trying to track down why my 2 VB6 apps crash intermittently in Vista. A total waste of time. I’m afraid these huge apps will have to be rewritten. I’ve been putting it off for years, have no desire to put my brain through that meat grinder.

By the time I finished banging my forehead against the keyboard with that futile exercise my brain was fried, so I plugged in the guitars. I GOT BLISTERS ON ME FINGERS.

PS. myspace music search for “tell us what you’re listening to”, hasn’t worked for the past two days. I’m listening to RUSH (I love you man).

Android Day 3

Wednesday, September 23rd, 2009

DroidDraw turns out to be a dud… imagine that. Actually it was ‘okay’, at least it gives you a starting point. But to fine tune the UI, you still need to hand code the XML file. Sigh. Reminds me of the DOS days, before Windows dev and GUI IDE’s.

Too many layout schemes to choose from, hard to write an app if you don’t know exactly what will work. Went with the relative layout to start, sounded flexible. Thinking eventually I’d have to code two views for each of the screens, vertical and horizontal views – but, why bother? It’s tough enough to fit all the widgets onto a vertical screen, it would be impossible to fit them all horizontally. The device naturally fits in your hand in the vertical position anyway, so I changed to table layout before getting into deep in the mud.

Wow, turns DroidDraw is perfect for setting widgets on a table layout. Good thing I abandoned the ‘relative layout’ early on. But, after spending 30 minutes drawing widgets, try to compile, it keeps telling me ‘Error in an XML file: aborting build’. Of course it doesn’t give any inkling of what the error is. Sigh – 30 minutes of staring at the screen I realized that DroidDraw had put a bunch of listeners into the XML of each widget. It was probably my fault, but it asked for a listener name, I assumed it would name it correctly.

Discovered ListView means something totally different in Android. A traditional drop down list is called a spinner in Android. Spinner? WTF? To confuse the newbies I guess.

Android has something the iPhone/iTouch hasn’t had since version 1.1, automatic numeric keypad popup when you touch a number field. iPhone OS 1.1 had it, then Apple dropped the ball on subsequent versions. Corporate dicks, long live open source.

Here it is, 3 days of work, a pretty picture. Anyone familiar with other version of the software will instantly recognize the interface. Of course there is no code behind. Rapping up early with some sense of accomplishment, too nice of a day to waste indoors. Tomorrow is another day.

abpk_droid

Android Day 1

Tuesday, September 22nd, 2009

Found an online book ‘Beginning Android’. I got lost on chapter 4, creating a skeleton application, Step 3, “package name”. The Eclipse plug-in has no F1 help. The book states “the package namespace follows the same rules as for packages in the Java programming language”, I hate circular definitions.

So I read through the beginner tutorial on the Android web site, which says THE EXACT SAME THING. What if you don’t know Java? So I googled the java website, and picked the name java.abpk, Eclipse accepted it. Then wrote some simple code and tried to run it. WRONG: “Your application failed with an error”, absolutely no explanation of what is causing the errror.

Delete, try again. This time I copied the ‘Hello World’ example verbatum, and it runs. The exaple uses the “com.example” namespace. “which is a namespace reserved for example documentation, when you develop your own applications, you should use a namespace that’s appropriate to your organization or entity.” WTF? I hate it when a beginner’s tutorial skips over an important fundamental fact, assuming you already know it. Hello, it’s supposed to be a *beginner’s* tutorial.

So what did I learn? *NOTHING* I already know how to copy and paste, I still have no idea what the proper Android namespace convention is.

Windows Mobile Browsers Fail

Tuesday, September 8th, 2009

This is how my Antibiotic Kinetics WebApp looks in the iPhone (and iPod touch):
itouch1

The Palm Pre and the Google Android phone also render the page correctly.

Now take a look at how 3 different Windows Mobile browsers incorrectly render this very simple page.

First, Windows Explorer Mobile 6 completely jumbles the page, randomly placing elements on the page in no logical order:
IE_WM6

Next is Opera Mobile 9.7, which almost gets it. The header is way too big, as are all the field descriptors:
opera_WM6

Finally, Fennec 1.0 displays the page much like Opera, only it is so tiny it is impossible to read:
fennec_WM6

I am completely befuddled. I wrote this WebApp in Microsoft’s ASP.NET using Microsoft’s Visual Studio. The page is served via a Windows Server. It makes absolutely no sense why these non-Microsoft devices (iPhone, Palm Pre, Android) display the page correctly, while Windows Mobile does not, regardless of which browser is running.