Posted on

Mobile Cross Platform Development : Cordova

Apache CordovaApache Cordova (aka Phonegap).

A little clarification on the name.  The NEW name will be Apache Cordova.   After Adobe bought the development firm that was working on Phonegap the Phonegap project itself was given to Apache Software Foundation to maintain its open source roots and continue development.  As of this writing the transition is still underway with MOST, but not all, elements haven taken on the Apache Cordova persona.

Our First App On Cordova

Our first app that we wrote using Cordova was the Abundascan application for Abundatrade.   The first release is a simple app that uses the camera to scan a barcode then sends the UPC to the Abundatrade server to get real-time prices that they will pay for used books, CDs, DVDs, and video games.    Functionally the app is simple and works well.    However one key element here is the primary reason we started with Cordova over other cross-platform tools like Corona, the camera.

Turns out that many of the cross-platform tools do NOT support the camera interface. That shot down Corona right away, which otherwise looked promising.

Cordova And Cameras

The nice part about Cordova is that the system is basically a wrapper for the native web browser.  That means coding in HTML5, CSS, and JavaScript.  It also has a number of third party plugins that hook native mobile functionality (via Java or Objective-C) to a JavaScript class.   In theory that sounds great.

Luckily there is a good camera scanner app that reads UPC,and other machine-enabled codes like QR, codes created by Google released in the ZXing project.  The ZXing applet is ported and ready to use for Cordova as a plugin.

Cordova Camera Caveats

The problem is that theory does not work out in reality.   The plugin for Android works wonderfully.  The plugin on OS-X, not so much.  Not surprising that a Google app talking through JavaScript to an Apple owned OS and development environment doesn’t work well.  Apple really does go through a lot of effort to put a stranglehold on their development pipeline.

The bottom line, we have yet to get the camera plugin to work on IOS4 or higher devices.   In theory the demo app works, but we’ve yet to see it on our iPod Touch or newer iPhones.

The Android Version of Abundascan is out, but we still are having issues with Cordova on IOS.

Our Second App

Our second app is a little less ambitious as it is testing the waters for a larger project.  This app is simply a screen that shows your current GPS location with exact latitude and longitude.   Where Am I Standing? is a free app that does just that.   To make it a little more interesting we wanted to add an info page with our name and logo and a little bit of graphic “window dressing”.

Again, here we ran into multiple issues.  This time noticeable right on the Android before we even attempted the iPhone release.    We want a simple app with no glitches yet there are several things that still aren’t right.  We can spend a good bit more time addressing in convoluted code to workaround quirky UI elements.  Others are as-yet un-fixable.

Technically it was easy & works well. Aesthetically it is NOT of the caliber I want it to be at.    As I dug deeper into this I uncovered a lot of hidden secrets about mobile app development and why 99.99% of these cross-platform tooks like Cordova fail.

The Compromises

Here are the “little details” that are compromises I don’t want to make.  I want to build QUALITY apps.  That means making them as perfect as we can, and this stuff is far from it:

Swipe Right / Left : I wanted to be able to simply swipe the main screen to see the info screen (“created by Cyber Sprocket”).     One swipe works, then it breaks.  This is a fundamental issue in the browser kit Cordova uses as the foundation for their solution.   Google developers refuse to address it saying it is “as designed”.

Vertical Page Scrolling : I don’t want ANY page scrolling, jitter, etc.   The pages are too “tall” and are scrollable if you swipe up or down.  This can be fixed but takes extra coding to do so.   What a pain.

Button Highlighting : Sometimes the highlights on the info/home buttons “stick”.  This is a built-in feature of jQuery Mobile and Cordova.  It is wonky at best.

Screen Hesitation: Even on a mid-range phone with just about the simplest app possible, sometimes going to the “info” page hesitates, same with going back to home.

Navigation History : Go to info, then back to home.   Each time you do this is adds to the “history”.  Do it a few times and your back button is loaded up with a bazillion loops of home/info/home.   Again, fixable with code (mostly) but why?

Summary

While Apache Cordova will help you build apps using technologies you likely already know like HTML5 and JavaScript, the implementation is far from simple.  Getting stuff to work on more than one platform requires extensive knowledge of all the quirks.  Like IOS requires a special onDeviceReady hook or it won’t even load properly.   The apps also feel “heavy”.    The UI is not responsive and, depending on the hardware, often misbehaves.

While Apache Cordova may be a great tools for building a functional prototype or possibly building corporate apps where users may value function over form, in my opinion Cordova is a compromise.

Yes,  you can probably build a well-polished UI.   But it takes a LOT of extra effort because you are hamstrung by the JavaScript/web interface.  Of course you can write custom Java or Objective-C hooks and/or make your own plugin, but isn’t that point to get away from native custom code?    You can also get around *some* of the quirks with a good bit more coding, but how you get around which quirks often requires intimate knowledge of the quirks for the particular mobile OS that is giving you problems.

I’m sure we can build quality apps with Apache Cordova, but this is not about CAN we do that, it is about what are the benefits of doing so.  From a business perspective there appears to be little gained here over a process that includes solid architecture, documentation, code design, and good old-fashioned cross-platform awareness and porting.

Posted on

iPhone versus Droid Incredible

Yup, here it is, another Droid versus iPhone comparison. If you read my last post on this topic you’ll know that I already played with the Motorola Droid about six months ago. The fact is AT&T coverage in Charleston sucks. It is by far the worst network in the area. While all my friends & coworkers are able to make & receive calls I am stuck in a zero-bar-zone-of-hell. It’s not just me and my phone either. Anyone else that visits with their iPhone in tow has similar connectivity problems. In fact someone just told me last week that they saw a comedian on stage held up his iPhone and said “they should just call it the ‘I'” to which he received a hearty round of applause and cheers. Guess it’s not just a problem in Charleston.

Anyway, I digress. The point is I need to use my ‘I’ as a business tool. It does me no good to have cool apps sitting on my desk next to my full fledged computer with 24″ widescreen HD monitor. What I need is a PHONE, not a 320×240 computer with cool touch screen apps. Since I get ZERO bars at our new office location it is time to revisit the iPhone versus ‘something’ debate once more.

Lucky for me, less than a month after relocating our office to yet another AT&T dead zone, the HTC Droid Incredible hit the market. Even luckier was the fact that I found LetsTalk.com had the phone in stock while every other store including ALL the area Verizon stores as well as Best Buy were on backorder for 3 weeks. Even better, LetsTalk.com had the phone for $50 less than Best Buy and $100 less than Verizon. Plus it came with a FREE 2GB microSD card. Can’t beat that!

First Impressions

Packaging

The first thing I noticed was the packaging. Small, neat, and very cleanly designed. Very much on par with the quality packaging Apple provides. The manuals are well written, not some obvious Chinese-English-Chinese Censors-English translation. Everything was well packed and in it’s hermetically sealed plastic bag. No cheap used bread bag twisty-ties either, the USB based power adapter had a nice neat black rubber band. Yeah, I know, piddly little details nobody really cares about, but it is obvious from the start that HTC put some thought into the packaging.

The same attention to detail was obvious when cracking open the case to install the battery. The entire inside of the case is a bright red with very clean lines and an easy-in/easy-out battery setup. The micro-sd slot is easily accessible on the side of the unit so no pulling out batteries to upgrade the SD card like some other phones. Again, details people don’t really care about, but still made for a good first impression.

Power On

After a brief charging session, to ensure I had plenty of juice to play with my new toy, it was time to power up. The very first thing I notices was the quality tactile experience with the buttons and the rubberized backing on the phone. While I wasn’t sure I’d like that rubberized feel, it actually makes it much easier to work with this phone. Unlike the iPhone which I always felt I needed to be extra careful with so it didn’t shoot out of my hands and across the room, smashing the $500 screen – the Droid Incredible feels firmly planted thanks to that backing. And the backing doesn’t feel cheap, in fact much to my surprise it feels surprisingly high quality.

Power button in… phone on. That fast. Yeah, this phone is WAAAAAYYYY faster than my iPhone. The iPhone takes about 1-2 seconds to just show the Apple logo, then another 15-20 seconds, on a good day… sometimes much more on a bad one, to fully boot. This Droid Incredible instantly shows signs of life & is ready for action within a few seconds.

The Screen

And when it comes to life you know it. That screen is bright, at least as bright as the iPhone. While I read some early reviews complaining about screen brightness, I didn’t notice. Maybe because it was evening, but side-by-side with my iPhone the Droid Incredible screen stands out. Not only is it bright, but the screen is exceptionally clear. The higher resolution stands out as do the bright vibrant colors.

Not only is the screen bright, has great resolution, and good color representation, it also has a very responsive touch screen. This screen is the first touch screen on a phone that is on par, or possibly even MORE responsive than the iPhone. HTC has really nailed this. While the on screen keyboard appears smaller for some reason, it is easier to type on. I find I type much faster on the HTC on screen keyboard than either the Motorola Droid slide out keyboard or the iPhone on screen keyboard.

The Apps

Wow this Incredible has a lot of cool features right out of the box. One of my favorites is the “HTC Scenes”. These are pre-set layouts for 3 or 4 of the 6 home screens that come on the phone. Each has different layouts of what apps or widgets appear where. It is not just a background changer, but an interface changer. While you can setup the interface to use any combination of full screen widgets, apps, and other utilities on your own – for people like me that don’t want to spend hours playing with those things… at least not yet… the half dozen options for “Scenes” that HTC gives you is perfect. A big full screen calendar on one page, a full screen message center on another, and a myriad of icon apps on a third… perfect for what I need right now.

That’s another thing I really like about this interface. You can take various widgets and plop them on a home page in full screen mode. When you flick between the screens, one of them will have that widget up and running in full screen mode – ready to go. You can’t do it with every program (at least not that I’ve found yet), but the built in widgets like the full screen calendar and message center are a great start. This saves at least one “click” compared to the iPhone when accessing oft-used applications.

Can I Use It As… gasp… A Phone?

The quick answer, HELL YEAH. I was actually able to make calls from my house and not drop the line after 2 minutes or less. That feat was absolutely impossible on my AT&T based iPhone. Next challenge… this morning at our new office. If nothing else, AT&T was consistent. As in AT&T NEVER had coverage here. This morning, 2 text messages and 2 calls on the Droid Incredible. No drops, no missed calls. Perfect. A phone that works as a phone! As I sit here looking at my iPhone with “no service” in the top left corner I can’t help but think “when is my docking station for the Incredible going to arrive… it will look so cool sitting there with it’s 3 bars”.

iPhone versus Droid Incredible

Droid Incredible iPhone (1st Gen)
Pros
  • Excellent touch screen response
  • Intuitive controls
  • Multiple screens for apps (6)
  • Great camera with usable flash
  • Video recorder
  • Call Clarity
  • Network Coverage
    better, but still does not have a
    signal at the home office 100% of the
    time, but always have a signal at the
    corporate office
  • App Store
    almost identical to the iPhone store
  • Available Apps
    seems to have most of what I want
    even some the iPhone doesn’t like
    Google Listen
  • Only $150 from LetsTalk.com
  • Excellent touch screen response
  • Intuitive controls
  • Multiple screens for apps (5+)
  • Plug it into the dock & it’s ready to talk to the PC
  • Tons of 3rd party device support
    it talks to my blu-ray surround sound system
    for example.
  • App Quality
    not all the apps are great, but none
    crash my phone
  • Available Apps
    There isn’t an app I can’t find, or at least
    a close enough clone. Except Google Listen.
  • MP3 Sound Quality
  • MP3 Equalizer
Cons
  • Can’t power on by touching the front of the device
    Pressing the “home” actually a scroll ball,
    or other button on the front should wake up
    the phone IMO, instead I have to find the
    power button on the top edge.
  • Network Coverage
    it sucks, plain & simple. less bars in more places.
  • Call Carity
    I thought it was OK, until I used the Droid
  • No Videos
    yeah, I can fix this by upgrading to the 3GS for another
    $300 and 2-year contract, $600+ if I want to stay
    month-to-month, ouch! Expensive!

Comparison : Head-To-Head

Feature Motorola Droid iPhone 1st Gen
Application Quality green_check_32x32
Application Selection tie tie
Apple has more, but both have
what I need.
Home Interface green_check_32x32
Photo Quality green_check_32x32
MP3 Sound Quality green_check_32x32
Network Coverage green_check_32x32
Screen Resolution green_check_32x32
Text/Media Messaging green_check_32x32
Touchscreen tie tie
Video Recording green_check_32x32
Visual Voicemail tie tie

Summary

I’ve only had my hands on the Droid Incredible for 24 hours now, but I am almost certain that my AT&T service is not going to make it until June. The fact is I NEED a phone and WANT cool mobile apps. The Droid Incredible is the first device to deliver both. Whether I was in the market for my first touch screen phone or looking for some way to get off the AT&T network without sacraficing all those cool features I’ve come to love on the iPhone… I think this is it.

My prediction: Verizon and the Droid Incredible are going to be eating one big chunk of AT&T and Apple’s pie this year. Good thing AT&T sat on their laurels when it came to customer service & network coverage… and Apple opted for a slice of the greed pie that AT&T served them the past 3 years. What’s better than some good solid market competition to give us, the customer, better choices.

HTC Droids offered by Lets Talk

I purchased my latest cell phone (a Droid Incredible by HTC ) from Lets Talk. Everyone else was sold out, yet they claimed they had plenty in stock. While I was a bit skeptical at first, my phone arrived in perfect condition in just 3 days for $50-$100 LESS than any other retailer I could find. Sweet!

[cj_show_items keywords=”+droid -shield -cover -protector -case -holder -skin” records_per_page=”5″ advertiser_ids=”893499″]