Posted on

App Inventor First Impressions : Coding An App

Google App InventorWe finally got our first App Inventor mobile application built and are underway on our second app. Here are our first impressions of building an actual app.

First App – The Pat A Cat Tutorial

The initial tutorial went very easily, after the fight to get the development environment set up. The first application took less than 5 minutes to create and get working, even in a standalone packaged app sent to my phone. I glossed over the “pet a cat” tutorial then created it without referring to the docs. It was very intuitive.

Second App – Barcode Scanner

The second attempt was a basic prototype of a far more complex application that was created with Eclipse and the Android SDK combined with the open source Zxing project. The idea is to have a simple bar-code scanner that when it scans a valid bar code calls a URL for one of our client sites and returns back the price they will pay for a book, dvd, cd, or video game.

With the initial Eclipse based project we had a standalone and fully self-contained app on-line within a hour. It worked well for a prototype and provides all the elements we need for a full blown app. It has to be coded in Java and requires a coding background.

With App Inventor we have a few hurdles as outlined below.

Hurdle 1 : Separate Install of Zxing Required

The built-in scanner class requires a third party application, the freely available Zxing App, to be pre-installed on the phone. That means if you were to put this into production all of your users would be required to go fetch and download another app before they could use this app.

Hurdle 2: Checking/Launching Third Party Prerequisites

Maybe I’m missing it, but I don’t see a simple way with the drag & drop interface to check if a third party app such as Zxing is already installed when running my new test app. That means we will only be able to wait until someone tries to scan, catch the error (we have error catching abilities, right?  We’ll need to look into that), and then tell them to exit the app and go install something else then come back.

There also does not seem to be any way to automatically launch a third party app other than the select few that Google App Inventor supplies. So that means not launching the marketplace and sending them a “search for zxing” command. Luckily we can launch a web browser with a URL, but that is not exactly the same.

Hurdle 3: Bundling Other Apps/Libs

The best solution would be to bundle the other app along with our app so that installing our test app automatically installs Zxing. Even better would be the ability to make it a self-contained component within our test app.

Test 2 Summary

All-in-all we could knock together a simple prototype of our new scanner app, but it would be a rudimentary version of the final app. Not being able to bundle Zxing easily and, even better, including the libs directly in our project, makes it hard to sell this as a consumer friendly application.

Of course this is a new IDE we are playing with here. Maybe all of this is possible for the expert App Inventor developer, but for a noob the methodologies are not readily apparent.

Initial Thoughts

After a full day of playing with App Inventory, here are my initial thoughts. The environment is perfect for simple to somewhat moderate level applications. It is good for things like a basic toddler app or a simple limited use consumer app. It may even be able to do some more complex tasks.

It is not going to build something like Angry Birds. Not even close (I know, that is not really what this IDE is for, at least not yet). It also is going to be difficult to create anything that is not based on down-the-middle business forms or simple media interfaces. Showing pics, playing sounds, firing off the camera or phone apps… no problem. But trying to complex interactions with any of those devices becomes more & more of a challenge to the point that learning some Java and using a full blown IDE starts to make sense.

So for a casual mobile app hacker that wants to create some simple apps for their kids, themselves, or their business it is great. It is also a good prototyping tool. Heck, you can even create some marketable apps here with some effort. At some point you will outgrow the environment and will want to start learning Java. This is a great way to get a layperson interested in the craft of computer programming though, and even teach them the basic concepts of logic and device interaction along the way. A perfect 101/201 level class in application development.

The only problem for a large number of casual app hackers is that you may need a comp sci Phd just to get the environment setup. And therein lies the rub. Google App Inventor is obviously targeted squarely at non-technophiles, the layperson that has an idea and a little bit of computer coding knowledge, NOT a hard-core tech geek. Yet, as you may have noticed in my prior posts, just getting setup can be a trail in patience and computer expertise. Yes, I have a “talent” for making technology break… any of the guys on my team will tell you that, but I assure you I’m not the only person who  will run into problems.

A promising start, and a great fit for the right people. We’ll probably use Google App Inventor for some of our own simplistic apps and definitely for more than one prototype. However, for prime time level A applications it is not there yet.

Posted on

App Inventor First Impressions : Setting Up

Google App InventorIn the previous article I went over some of the notable items on the Terms of Service for Google App Inventor. Here we get into building our first simple app.

App Inventor and Java

While you don’t need to know how to code in Java, you will need Java installed on your computer. Don’t worry, your computer probably already has Java on it. If not, it is usually a simple process to install or upgrade Java on your system. It is not any more difficult than installing or upgrading Flash. That said, sometimes getting Flash or Java upgraded and installed can be a challenge depending on your computer security settings, hardware, disk space, memory, and other unique factors that require you to hire a Comp Sci major just to get started.

Notes about App Inventory and Java…

  • Requires Java 6.
  • Upgrading (or intsalling) Java can be a challenge on some systems.
  • Get Java at http://www.java.com/inc/BrowserRedirect1.jsp?locale=en

Java Exposes It’s Ugly

Now that we have our Java environment up-to-date we can get started. Surf to your App Inventor login and launch the program. If everything is going well you can follow the Google tutorial and start creating your first app, a picture of a cat that will meow when clicked.

This is where things get ugly for App Inventor and Java.

There are 3 main parts to creating your App Inventor mobile app:

  • The App Inventory Palette – where you draw your interface by dragging & dropping components onto a mockup phone.
  • The Block Editor – where you drag and drop logic components using a puzzle analogy. In essence you are writing Java code visually.
  • The Phone – connecting your Android phone is your staging (or testing) environment to see how things really work when “glued” together.

All was going well. The palette came up, got the button, the photo, the MP3 file all in place. Got the phone connected and the PC loaded the device drivers for the HTC Incredible being used as the test device.

Ok… let’s start writing some code. Fire up Block Editor. And…

We get “Java Ugly” in full effect. While Java has some very cool things that deserve bragging rights, over a decade into its existence and it still retains the uglies UI contest hands-down. Not only do all default Java interfaces look like they were designed for a 1987 character based terminal, they are often less than helpful in helping you interact with whatever files, folders, devices, or web addresses you need to resolve a problem.

In my case the “command interpreter” that allows the App Inventor to talk to the phone cannot be found. The ugliness ensues:

"Java Ugly" Command Directory
“Java Ugly” Command Directory

Yikes. Welcome to 1987.

Fixing The Missing Blocks Command Directory

Turns out that I missed an important step before setting up my environment. Not only do you need to upgrade/install Java, but you also need a desktop program that Google App Inventor uses to communicate with the phone (among other things). The Windows version is here:

http://www.appinventorbeta.com/learn/setup/setupwindows.html

Next Problem : Windows And Google Not Playing Nice

The next problem we run into is that the Block Editor cannot talk to the phone. It just doesn’t see it. After reviewing the App Inventor setup program we learn that you should “not change the default installation directory”. Virtually every single app on my computer goes on my 500GB D: drive, NOT the default C:\Program Files directory.    Wow.  Really, “don’t change the default install location”. Back to 1987 I guess.

So we uninstall the application.  Re-install it in the default place.   All is good, right?

Well, not so fast. Now the Block Editor is looking in the original D:\ install location but it cannot find some of the necessary components.

Great. Copy all the components over from the C:\program files directory. Still not working. Uninstall and delete EVERYTHING. Reboot…  we’ll be right back…

Windows Serves Up EPIC Fail

We’ll be right back, my butt. On the reboot windows decided my Windows account no longer exists. I was immediately greeted with a rather useless “The User Profile Service failed the logon.” message as soon as I tried to get into my Windows account on my local PC. Great. Off to safe reboot & finding the answer.

Now for the favorite part of my app development experience. REGISTRY EDITING.

Yup, that’s right. To restore my account back to normal I had to edit the windows registry. What fun. Luckily that is all it took and the instructions I found on the Microsoft Support site actually worked. If you ever need to do this yourself, make sure you sacrifice the requisite number of goats then follow this link:

http://support.microsoft.com/kb/947215

Try, Try Again

PC back online. Check.

Re-install the appinventor_setup_installer_v_1_2.exe.

Open up the Google App Inventor at http://appinventor.googlelabs.com/. Check.

Open up the Block Editor. Check.

Ohhh… wait… no devices found. The editor is open, but it can’t talk to my phone. The phone is in the proper USB debug mode. No communication with the device. Wonderful.

It turns out that the AppInventor_Setup_Installer executable that we downloaded (all 90MB) may NOT have the proper driver for the HTC Incredible phone, even though Google notes it as one of the phones that works with this development IDE. Now we need to go to the HTC site and find the right driver and try this all over again.

Just to make matters even more fun, there is no simple “HTC Incredible” device driver. However, even with the phone attached to my PC and visible as an external device, a visit to the Device Manager in windows shows it as an unknown device with a name like “ADB”.

Setting Up HTC Drivers for Windows

So here I am, no obvious HTC Incredible drivers. Some hints on the “Internet at large” indicate that the full blown 30MB HTC Sync application, WHICH I DO NOT WANT, will have a driver for the phone packaged up in there. I sure as heck hope it doesn’t mess with my already working perfectly Google Sync program that keeps my contacts, calendar, and email all perfectly in sync with the Toshiba Thrive table, HTC Incredible phone, and my Windows desktop. We’ll see.

For now, I sit and wait… going on 15 minutes now… for a 30MB file to be downloaded from what must only be direct via mainland China on the 宏達國際電子股份有限公司 (HTC Corporation in case you’re wondering) website. I’m on a 50MB/10MB line, but this is slow as heck. Must be getting interrupted by some goats, stray chickens, and a stray tank rolling over the fiber line before it tunnels it’s way under the Great Wall on the way to The States. Man this is slow. Guess I’ll go practice more guitar lessons while I wait…

…I’m back.

Installation of the HTC Sync program got the drivers. Sadly I had to start the installation, let it install Adobe AIR, the HTC driver, and some other junk then cancel out right at the start of the actual HTC Sync installation. At least I got out of that.

Next.. maybe we can code our first app.

Not So Fast…

Wow, this sure is a LOT of work for a supposedly easier way to develop Android mobile apps. I had Java, Eclipse, the SDK and my first mobile app written the “old fashioned way”, you know… with CODE and an tried & true ID like Eclispe, done in much less time than the 4+ hours getting this setup.

My intention was to write a quick article on actually using the App Inventor IDE, yet here I am writing about how to setup the IDE and how to install drivers and how to debug a failed Windows login.

So much for quick & easy.

Hopefully the next article will be about actually creating a usable app with App Inventor.  Stay tuned.

Posted on

App Inventor First Impressions : Signing Up

Google App InventorGoogle App Inventor is a service and development platform provided by Google to make it easier to create and deploy Android mobile applications. I am reviewing the viability of this platform now that the technology has matured a bit and is gaining more acceptance in the community. It appears this project may have some longevity, which is always a concern with any Google endeavor.

One of the risk factors of a service like this is that the provider can pull the plug at any time. As many companies have learned along the way, if you rely on a Google Labs project as a core part of any project you may well find yourself re-inventing and re-creating on relatively short notice. Google has a history of dropping anything they consider a failed project with little advance warning.

Terms of Service

Nobody ever reads this things. You should. Especially when it comes to basing your next big money making software product on a platform somebody else OWNS. That’s right, Google OWNS the platform. That means they can make changes that directly impact your ability to produce, update, and continue to sell your project. If you’ve got the next Angry Birds on this platform you really don’t want rely SOLELY on an external organization, even one that will seemingly be around “forever”.

Here are some notable items in the TOS from Google App Inventor:

4.2. Google reserves the right (but shall have no obligation) to pre-screen, review, flag, filter, modify, refuse or remove any or all Applications from the Service. Google reserves the right to directly take down any Application that violates these Terms, any applicable Program Policies, or applicable law or regulation.

In other words, Google can pull the plug on your project at any time for any reason and even stop your product from being listed in the first place.

4.4. You agree that Google has no responsibility or liability for the deletion or failure to store your Application and other communications maintained or transmitted through use of the Service. You further acknowledge that you are solely responsible for securing and backing up your Application.

If they do pull your project, oh well. You are on your own. You cannot sue them if your $5k/month revenue stream suddenly goes away because they pulled your app.

5.3. Except as provided in Section 7, Google acknowledges and agrees that it obtains no right, title or interest from you (or your licensors) under these Terms in or to any Application that you create, submit, post, transmit or display on, or through, the Service, including any intellectual property rights which subsist in that Application (whether those rights happen to be registered or not, and wherever in the world those rights may exist). Unless you have agreed otherwise in writing with Google, you agree that you are responsible for protecting and enforcing those rights and that Google has no obligation to do so on your behalf.

Unlike some other online services, Google does not get any ownership of the project you post on this service. What you create you own.

7.2. You agree that Google, in its sole discretion, may use the trade names, trademarks, service marks, logos, domain names and other distinctive brand features of your Application in presentations, marketing materials, customer lists, financial reports and Web site listings (including links to your website) for the purpose of advertising or publicizing your use of the Service. 7.3. If you create an Application to share with other users of the Service, you may determine with whom you share the Application and grant to such users a non-exclusive, worldwide, and perpetual license to perform, display, and use the Application.

While you retain ownership of your app, if you have the next runaway hit Google can leverage your brand awareness to their benefit. In other words if you create the next Angry Birds app, Google can promote the heck out if it in their marketing pitch for their service… “Joe’s Super Cool App was created with Google App Inventor” and plaster that message all over the place. I see no real downside in this, but it is something to be aware of in case you later think “hey, they should be paying me to use my notoriety” once you get rich & famous.

What Is App Inventor?

App Inventor is a project manager and web based IDE (integrated development environment) for Android mobile apps. Like most IDEs these days the App Inventor starts of by being a graphical design environment. You “draw” how you want the app to look first, then connect functionality later.

“Real” programmers don’t necessarily like this as it can allow for some very sloppy coding. It also allows programming “noobs” to get in on app development without understanding the design principles of creating sustainable applications. However it is a great way to start an application for a mockup or to create simple applications that don’t require complex process flows.

In Progress…

I am now off to create my first App Inventor app. Stay tuned for follow up articles on the Google App Inventor IDE.