How to Switch to Another Activity

First, create a new activity by:

  1. creating a new Java class that extends Activity (for our example, we’ll call it Step1Activity)
  2. creating a new XML layout
  3. adding the new activity to the Android manifest XML

Second, from, say, a button’s onClick() implementation, add this:

Intent i = new Intent(getApplicationContext(), Step1Activity.class);

To resolve various names, you’ll need to import a bunch of things. For example, to resolve ‘Intent’, you’ll need this:

import android.content.Intent;

In general, I Google the name (along with “android”) and use the URL at to tell me what the import is.

Published in: on January 18, 2012 at 4:49 pm  Leave a Comment  

Tips for Using the Android Emulator

The Android emulator is slow as molasses in January. If at all possible, get an Android phone for development. I purchased a prepaid, unlocked Google Nexus S from Break Wind Mobile for C$380, a good investment.

If you must use the emulator, you should configure it to use more memory. Go to Run->Run Configurations…->Target tab for your app. For “Additional Emulator Command Line Options”, insert “-partition-size 1024”. You may also want to check off “Wipe User Data” so that from time to time, you can start with a clean slate.

Starting the emulator can be problematic. An “emulator disconnected” error is common. So once you have it up and running, try not to shut it down; you can repeatedly upload your app to the emulator for testing.

I also found that having a command line window open with ‘adb logcat’ running helps to stabilize the situation. In Windows, go to where android-sdks\platform-tools is and run ‘adb logcat’. You can also filter results with ‘adb logcat | find “your_app_tag”‘.

Published in: on January 18, 2012 at 4:24 pm  Leave a Comment  

The Pain of Developing for Android

Make no mistake about it. Developing for Android is a f*cking PITA. The people who created Android had no conception of ease of use, user-friendliness, or high productivity. Their only goal was programming flexibility. Typical hacker mentality.

I recently started to write an Android version of an iPhone app. Writing for iOS, using Xcode, is a breeze compared to using Eclipse and ADT. The Android environment is extremely complex (remember, the people behind Android were only interested in flexibility, elegance be damned).

Here are the three biggest gripes I have about Android development:

  1. The Android emulator is unbelievably slow and generally unreliable. It takes several minutes to upload an application to it!! And starting up the emulator fails about half the time (the dreaded “emulator disconnected” error).
  2. Each step in adding functionality to the app is like pulling teeth. Nothing is easy nor straightforward. The SDK has voluminous documentation, but it is tough slogging to get through, and there is a dearth of good examples.
  3. ADT’s counterpart to Xcode’s Interface Builder is crude, unintuitive, incomplete, and frustrating to use. Trying to visually layout your application screen is so painful, it nearly pushed me to suicide.

I’ve overcome a number of obstacles that I’m sure most novices to Android development would normally encounter, so I have created this blog to help them.

Published in: on January 8, 2012 at 3:45 pm  Comments (1)  

Kill Them All!

Apple and Amazon will rule the tablet space absolutely. All the other tablet vendors are so f*cked…

The newly established price point of $199 will squeeze out everybody who doesn’t have a major market advantage. Apple have their phenomenal marketing — the only reason people pay $499+ for an iPad is because of cachet. Nobody else can generate this kind of cachet — not Sony, not HP, not Samsung, not Motorola, not Toshiba.

Amazon (and Apple) have their ecosystem. Amazon is subsidizing the Kindle Fire with anticipated future sales of content, ie, books, music, movies, apps. It’s the Gillette model of selling razor blades (or the printer model of selling inkjet cartridges, or the cellphone model of selling voice/data plans). (Apple don’t have to subsidize anything because they have the power of cachet.)

The other vendors are so f*cked. They can’t compete on price. If they try to sell their larger tablets at, say, $299, they will lose money without any kind of compensation. And who’s going to spend $400-500 on a non-iPad tablet?? WHY would they spend $400-500 on a non-iPad tablet? Just for the rear-facing camera that people seldom use? Just for 16-32GB of storage, at a time when everything is moving into the cloud?

They might be able to sell on the basis of 3G/4G, but the reality is, most people don’t want to spend extra on a data plan. The big money is in Wi-Fi-only models.

The only vendor who might come out of this alive is Sony — they also have an ecosystem of sorts that they can build on, if they have the wherewithal.

Amazon have turned out to be the Spartacus of the tablet universe. Jeff Bezos said, “Kill them all!” And he’s doing just that.

Published in: on September 29, 2011 at 8:25 am  Leave a Comment  

Hey, Don’t Diss My Condo!!!

#5 – West Harbour City II at 21 Grand Magazine Street


“Grand Magazine” is yet another stupid name I have enjoyed making fun of, and with 10% of all existing units in the building currently available for sale, perhaps residents should get a second job selling magazines just in case their investments plummet like a Greek bank stock…

I’ve never been a fan of this area, since living in between the Gardiner and Lake Shore doesn’t really appeal to me, so I think it’s going to be twice as difficult for the market to absorb all this inventory.  First, you have to find people that actually want to live here!  Second, you have to convince buyers that there’s nothing wrong with the fact that 32 units are for sale in this 325-unit building.

Finally, he writes:

As for the rest – it’s all junk.

It’s all CityPlace junk and I’ll argue this till the day I die, or until Concord Adex has me taken out.

It should come as no surprise that HALF of the condos on this list are in CityPlace or the surrounding area of Fort York (which is still considered CityPlace by some), and it certainly is no coincidence.

Now – for those of you that are reading this and happen to own in one of the twelve buildings listed above, please use the forum below to squish your sour grapes…

Okay, I’ll bite. I have a unit at West Harbour City II. It has a fantastic view of the lake, island airport, and CN Tower. I revel in the view every morning when I wake up. Just seeing the sunlight play off the water uplifts me.

My floorplan is fabulous. For the space (1161 sq ft), I couldn’t ask for a better floorplan. It’s very efficient and it has great flow. After my interior designer did her magic, my condo is drop dead gorgeous (there’ll be no need for “staging” when it comes time to sell!).

I’ve thrown several dinner parties, and everyone drools over my condo. I have no doubt that I will be able to easily sell my unit when the time comes. And that’s an important point: I anticipate selling 5-7 years down the road. Who can say what the market will be like then? Will today’s “glut” go away?

I love living in this area. The moderating influence of the water is terrific during the summer (though winters should be brutal). I love walking along Queen’s Quay. And I’m only half an hour’s walk from Chinatown, which I’ve taken advantage of frequently (great exercise). In other words, this is a great location.

As for the street name, there is an historical significance to it, if you believe Heritage Toronto:

“The Grand Magazine holding Fort York’s gunpowder supply stood at the north end of this street. In the Battle of York, 1813, the retreating British detonated the magazine with devastating impact on the American attack.”

I love the name!

And TTC access is dreamy. Right in front of the building, I can catch either the Bathurst 511 or Union Station 509 streetcars!

Within a couple of years, there will be a Loblaws Superstore across the street. Incredibly convenient.

Since I only paid $369 psf for my unit, no matter what happens in the condo market, I will be largely insulated from financial disaster. Isn’t pre-construction great?!

The condos on your list have a glut of unsold units for different reasons. In the case of the waterfront condos, I have a theory. Neptune, West Harbour City, and Panorama are well south of the railroad tracks, and even south of the Gardiner. The general perception is that they are too remote and disconnected from the downtown core.

This perception is a sad reflection on how lazy people are. West Harbour City is easily within walking distance of the downtown core. I can walk to Queen & Spadina within 20 minutes. I can walk to King & University within 25 minutes. I’ve been walking to the downtown core this lovely summer nearly every day for the past 3 months! How is West Harbour City disconnected from downtown??

Just how lazy is everyone? I am bemused when I see people at Yorkdale driving around for 10 minutes looking for a parking spot close to the front doors. They refuse to park further away and walk for a few minutes. Unbelievably lazy!

No wonder we have a nation of overweight diabetics and heart attack victims waiting to happen. C’mon, the Fort York condo area is not as remote as you think. Just get off your ass and do the walk.

Published in: on August 26, 2011 at 9:18 am  Leave a Comment  

I Rule The World

Published in: on August 10, 2011 at 10:25 am  Leave a Comment  

The Pre-Construction Paradox

In today’s market, it makes absolutely no sense to buy a pre-construction condo. And yet, the pre-construction condo market remains red hot. What will come of this stupidity? Anyone care to hazard a guess?

Published in: on August 8, 2011 at 8:34 am  Leave a Comment  

A New Dawn

This is how my new condo makes me feel:

Published in: on August 8, 2011 at 8:17 am  Leave a Comment  

My Feature Wall

I chose Bonaparte Red for the feature (or accent) wall in my condo:

Published in: on August 8, 2011 at 7:58 am  Leave a Comment  

My Floorplan

I was very fortunate to get a condo unit with what I feel is an ideal floorplan (for me, at least). The floorplan has a nice flow to it. It makes good use of space. The relative positioning of the various rooms is perfect for my needs.

I love the hallway entrance. You walk in and you are immediately greeted by a magnificent floor mirror and a striking painting (called “Rapture”).

The home office is ideally situated right off the living room and close to the master bedroom. The main bath is close to the den/guest bedroom. The kitchen is right off the dining area. Beautiful flow.

Published in: on August 4, 2011 at 2:51 pm  Leave a Comment