android

Android apps on my phone

I was the first one at work to get an Android phone. As word got around I have become the guy to go to when it comes to Android. I get asked questions about Android before they buy. I also get questions about Android after they’ve bought their new phone. One thing that people seem to appreciate is when I provide them with a list of apps to get them started.

Without further ado, here is a list of most of the apps I have on my phone. I’ve not included some of the apps (e.g., OEM pre-installed crap).
(more…)

android

How I managed to install the CyanogenMod 6.0.0-Droid-RC2 on my Motorola Droid from a Mac Book Pro (OSX v.10.6.4)

First I read the wiki entry http://wiki.cyanogenmod.com/index.php?title=Full_Update_Guide_-_Motorola_Droid As I was reading I noticed that there were no directions for OSX; only for Windows and Linux. It turns out that the flash recovery tools are not available for OSX. That means that I would have to do this from a virtual machine.

Because I am more comfortable with Linux I decided to use Ubuntu running in a virtual machine. I grabbed a copy of VMWare Fusion from http://downloads.vmware.com/ I then grabbed a copy of Ubuntu from http://www.ubuntu.com/desktop/get-ubuntu/download I had use VMWare with Windows before so I knew this couldn’t be that difficult but I skimmed http://svenand.blogdrive.com/archive/56.html just in case there might be any gotchas.

Once VMWare was installed and a copy of Ubuntu was up and running I began down the path described in the wiki page noted above. Unfortunately I ran into problems in section entitledInstalling SPRecovery with sbf_flash (Linux).Steps 1-5 worked without a problem. However, during step 6 the process for me looked like this

[email protected]:/tmp# ./sbf_flash SPRecovery_ESE81.sbf
SBF FLASH 1.08 (mbm)

Index[1]: Unexpected chip 16
Index[2]: Unexpected chip 16
=== SPRecovery_ESE81.sbf ===
00: RDL03 0x80500000-0x8054CFFF FE66 AP
01:  CG35 0xC0680000-0xC08E37FF ABCB AP
02:  CG47 0xC0A00000-0xC0D5C7FF 02C0 AP

Droid found.
 >> uploading RDL03
Uploading: 100% OK
 >> verifying ramloader
 -- OK
 >> executing ramloader
 >> waiting for phone:

…and there it would sit. I tried this a couple of times each time with the same result.

The few pages that google returned didn’t quite get me there and then I noticed something strange in the VMWare window. The USB button at the bottom of the window was grayed out where before it was black:

VMWare USB Button

I clicked on the button and started again.

This time, when the waiting for phone: appeared I clicked the USB button to enable USB and the process completed.

[email protected]:/tmp# ./sbf_flash SPRecovery_ESE81.sbf
SBF FLASH 1.08 (mbm)

Index[1]: Unexpected chip 16
Index[2]: Unexpected chip 16
=== SPRecovery_ESE81.sbf ===
00: RDL03 0x80500000-0x8054CFFF FE66 AP
01:  CG35 0xC0680000-0xC08E37FF ABCB AP
02:  CG47 0xC0A00000-0xC0D5C7FF 02C0 AP

Droid found.
 >> uploading RDL03
Uploading: 100% OK
 >> verifying ramloader
 -- OK
 >> executing ramloader
 >> waiting for phone: Droid found.
 >> sending erase
 >> uploading CG35
Uploading: 100% OK
 >> uploading CG47
Uploading: 100% OK
 >> verifying CG35
 -- OK
 >> verifying CG47
 -- OK
 >> rebooting
[email protected]:/tmp#

Note above where waiting for phone: is shown is where the USB button turned gray. When I clicked the USB button is where Droid found. appeared and the rest of the output followed.

android

r cannot be resolved

In the Google group Android Beginners I frequently see messages that ask what the error "r cannot be resolved" means in Eclipse.

Eclipse generates the file R.java for you using the aapt tool (Official Guide to the Android Asset Packaging Tool). R.java contains a mapping to all the resources your application will use. Note that you should have the Build Automatically option under the Project menu checked on.

If this happens to you, make sure the files under res/ are valid (make sure they are not marked invalid in Eclipse). Since aapt generates R.java from the files in res/ if those files are mucked aapt can’t work.

An example of an aapt generated R.java file:

  /* AUTO-GENERATED FILE.  DO NOT MODIFY.
   *
   * This class was automatically generated by the
   * aapt tool from the resource data it found.  It
   * should not be modified by hand.
   */

  package com.likethecolor.android.helloandroid;

  public final class R {
      public static final class attr {
      }
      public static final class drawable {
          public static final int icon=0x7f020000;
      }
      public static final class layout {
          public static final int main=0x7f030000;
      }
      public static final class string {
          public static final int app_name=0x7f040001;
          public static final int hello=0x7f040000;
      }
  }

While I use Eclipse for my Android development it is always good to know how things work behind the scenes. I’ve tried to find a more detailed description of how aapt creates R.java but can find nothing more than a vague description:

From: http://developer.android.com/guide/tutorials/notepad/notepad-ex1.html

The folders under res/ in the Eclipse project are for resources. There is a specific structure to the folders and files under res/. Resources defined in these folders and files will have corresponding entries in the R.class allowing them to be easily accessed and used from your application. The R.class is automatically generated using the contents of the res/ folder by the eclipse plugin (or by aapt if you use the command line tools). Furthermore, they will be bundled and deployed for you as part of the application.

This is how one might run aapt from command line (note that this command must be run from the top level of your project):

  aapt package -m -J src -M AndroidManifest.xml -S res -I /platforms/android-2.0/android.jar

While doing a clean project and build project has always worked for me, this site suggested clicking on "Fix Project Properties" which appears under "Android Tools" when right/ctrl-clicking on the project in the package explorer.

Another possibility is that when creating a new source file your IDE (e.g., eclipse) may have added

  import android.R;

That may be fine if you actually have a package called android in which there is a class R but that’s probably not the case. Removing that import would solve the problem.

android

To Android or to iPhone?

I’ve wanted an iPhone for at least a year. Six to eight months ago I decided I was going to make the switch from Verizon to AT&T – just for the iPhone. Our Verizon contract expires next month. Now that December 8th is almost here I have begun counting the days. How exciting it will be to walk into the AT&T store and pick up my new iPhone.

I appreciate the quality of Apple products. From the beauty and elegance of the design to the simplicity of the user interface. It is obvious that they put great thought into the product as a whole. I wouldn’t call myself a “fanboy” but I’m pretty close. This is why it has come as a surprise that I have decided to go with the new Droid that Verizon just made available (http://phones.verizonwireless.com/motorola/droid/).

Wait, What?

What changed my mind? The most powerful reason is this feeling I’ve had growing inside me. The feeling that going with the iPhone/AT&T combo might be a mistake. I cannot put my finger on it. It just didn’t feel right. I have never been one to follow the crowd. Perhaps somewhere deep inside I’ve gotten the impression that the iPhone has become too common. Then again maybe there is something to all the red and blue maps I’ve been seeing showing how much more coverage Verizon provides.

About 2 weeks ago I was listening to a podcast of This Week in Google (http://www.twit.tv/twig). Leo Laporte suggested that with the release of Droid there’s no reason to switch from Verizon to AT&T just for the iPhone. I don’t know Leo personally, however, in the past few years I have listened to Leo on a number of shows. I get the impression that he has an open mind and is not one to give in to hype. Leo’s comment was the proverbial straw. I needed to at least look into this other option.

I went to the local Verizon store a couple of times. I spoke with a couple of Verizon people in there, one of whom had just purchased a Droid. I’ve played around with it and must say it’s a nice phone.

Personally we have not had any issues with Verizon. Our bill has always been accurate. Once when speaking with them on the phone they noticed we were texting a lot and suggested a plan to help us save money on texting. We’ve not had to deal with their customer service for anything major. So far all my interactions with Verizon have been positive.

One thing that disturbs me is how Verizon locks down their phones. That Verizon wants to have control over the phones. One example is how they charge $15 to allow access to Microsoft Exchange. This is something the phone will do as is. “Enterprise Data Plan” is their fancy name for it but it doesn’t cost Verizon anything. They’ve just found something that they can charge for (e.g., http://www.rimarkable.com/almost-thought-for-minute-that-verizon-wasnt-going-to-lock-the-droid-down).

I hope to develop applications for the phone I get, for fun and profit so the development process is something I considered as well.

iPhone Development

The language is Objective-C. I’ve written a simple iPhone application and gotten it to work in the simulator. I enjoy writing code in Objective-C and the frameworks Apple provides make it quite easy to do some complex things. Tools used to build the applications like Xcode and Interface Builder work well together. Instruments is a nice profiling tool. The simulator integrates nicely with Xcode. Even so, I am still very much a novice when it comes to the language. The thought of having to deal with memory management still scares me.

From what I’ve read, it sounds like getting your iPhone application approved by Apple is a huge pain (e.g., http://developer.apple.com/iPhone/program/apply.html, http://iphoneincubator.com/blog/app-store/rejections, http://ephemera.lifewithalacrity.com/2008/07/the-nightmare-t.html). It is unfortunate that something that should be simple isn’t.

The fee is $99 to get into the program. But get this, you cannot get the application onto any iPhone, not even for testing, without paying the $99 fee. In order to install the application on your iPhone you need to pay the fee and get a certificate from Apple (http://www.mikeash.com/?page=pyblog/the-iphone-development-story.html). Even if you just want to write an application for your personal use on your own iPhone with out paying the fee you are out of luck (I know there are ways around this but why should you have to?).

Android Development

For Android the language is Java. I’ve been doing Java for quite a while and am very comfortable in that environment.

For Android it seems like the development and publishing process is easier. I’ve already created a development signature for the tutorial applications (http://developer.android.com/guide/publishing/app-signing.html). However, I won’t know for certain that I can install anything on the phone until I get a phone.

The fee is $25 to get your application onto the Android Market. It sounds like it is very simple (http://www.4feets.com/2009/02/developing-and-publishing-a-new-android-game-in-3-days/). As I understand it you can put your application on your own phone without paying anyone anything. The $25 is only if you want to get your application out to the world.

Another difference between the iPhone and Android phones is the ability for Android phones to run more than one application at a time. When I first heard this I thought about what this might mean to me as a user and it didn’t seem to matter. However, after reading the Android developer documents I can see how this would be very useful as a developer. As I understand it, this feature is available on the iPhone just not to third-party applications.

From what I’ve read, the Android world is much more open and overall less strict. For instance, I was able to download the Java source code. In addition, developers can publish to the Android Market anything they want. That’s nice but it also means there might be a bunch of crap apps out there (I see that as an opportunity to make things better).

I also took into account the current size of the 2 application venues. The iPhone App Store recently hit 100,000 apps while the Android Market is around 10,000. What that tells me as a developer is that it will be more difficult to create something new and different for the iPhone. If I’m going to create something new and (hopefully) make money from it, it seems to me that there is a much greater chance of creating something new for the Android Market.

One last thing. These are phones. They are nice phones with a bunch of stuff on them but their primary job is to be a phone. That means that the phone part should work without question. Friends and colleagues who have iPhones have mentioned that AT&T constantly drops calls and it seems to be getting worse. One guy at work said he loses at least a call a day. In the past 2 years with Verizon I’m sure I’ve lost a call or two but it happens so rarely it’s not something I even think about.

[EDIT: 2009-11-18] After talking with an admin friend about Verizon charging extra to connect to Microsoft Exchange he made a good point. There is a lot of data that flows between a client and Exchange server as it is constantly pulling and pushing. Don’t know if that warrants an extra $15 a month but it is a valid point.

%d bloggers like this: