iPhone 4.0 and Multitasking

Back in Jan. I wrote the following about Apple’s view of multitasking:

Normal users do not want to deal with resource management nor do they understand it.

Today, Steve Jobs confirmed it by saying, “In multitasking, if you see a task manager… they blew it. Users shouldn’t ever have to think about it.”

The problem is that, neither webOS and Android have a task manager (although the first thing that most Android users download is a task manager). Also, webOS has a much better implementation of app switching than iPhone 4.0. Quitting apps on webOS is a simple flick of the finger up while you have to tap and hold an app in the taskbar to quit an app in iPhone 4.0.

By restricting backgrounded apps to one of 7 services, Apple has solved the problem of resource and battery management. The 7 services, audio, VoIP, location, push notifications, local notifications, fast app, and “task” completion, allows for 90% of what most users will need backgrounding for. Sadly, though 4.0 won’t be hitting the iPad until Fall, 6 months or 1/2 the iPad 1.0’s life cycle.


Switching to Android/Nexus One from iPhone

After Google released the Nexus One with 3G AT&T compatibility, it looked like a perfect time to switch off the iPhone. Being able to use my current AT&T sim while maintaining 3g speeds pushed me over the edge (no pun intended). After a week of using the Nexus One as my main phone, here are some thoughts.

Top 6 Nexus One/Android Pros

  • Gmail – It won’t come as any surprise but if you’re a heavy Gmail user, Android should be your phone of choice. Labels, archive, search, and threads. Almost as good as the real thing
  • Hot Spot – with a simple rom replacement and wifi-tether, my phone is now a mobile hot spot. (Hello iPad 3G without paying an extra $20).
  • Widgets – News widget, foursquare widget, the homescreens of the Android are much more useful than the iPhone’s. Also, Maps has a live wallpaper that shows traffic for my current area, constantly.
  • Turn by Turn Directions – Built in turn by turn directions allows you to toss your GPS.
  • Widgets

    The power widget allows you to turn on/off power draining features of the phone from the homescreen. This is great since the Nexus One doesn’t seem to be able to make it through a whole day for me.
  • Google Voice – Full Google Voice integration… if you’re a Google Voice user. I won’t use Google Voice until I can port my existing number to it.

Top 6 Nexus One/Android Annoyances

  • Non-Gmail Email – I have serious issues with my company’s exchange account. For no discernible reason, the native Email app stops syncing mails. Refresh doesn’t help, deleting the account and recreating will solve the problem for a couple days. Infuriating. Also it’s not possible to search non-Gmail accounts. To top it off, there’s no way to access a Yahoo! mail account (except to pay for Yahoo! Mail Plus)
  • No Exchange Calendar Sync – No explanation needed.
  • Landscape mode only works turning left! – At first I thought many apps didn’t have landscape mode, but apparently turning the phone clockwise will not trigger landscape mode. This might be useful when reading in bed, but so far it’s been an annoyance.
  • Touch screen is inaccurate – in the browser, I find myself clicking on a link only to have the link below register the click. Reports of the Nexus One’s touchscreen being inferior are not exaggerated
  • No good Podcast listener – the best podcast app I’ve found is Google Listen. It auto syncs podcast but lacks double speed playback!
  • Missing Mint.com and Scrabble/Words with Friends – There is no native Mint.com or Scrabble or the Scrabble rip-off Word with Friends.

Over the course of a couple weeks, friends have asked me “Hey, is that a better phone than my iPhone.” I have consistently said absolutely not. You give up quiet a bit to go full Android over the iPhone. The pros just don’t outweigh the cons.

The only reason I could recommend a Nexus over an iPhone is if you’re heavily invested in Google apps, Gmail, Google Voice, Picasa etc. With that in mind, Nexus is competing against the iPhone 3GS, not the iPhone HD (or 4g) and iPhone OS 3.2. We’ll see what Apple has up their sleeve on Thursday and this June.

2009 Predictions Retrospective

2009 is ending, a year that started with Sequoia’s RIP: Good Times fresh in everybody’s mind. However, 2009 saw some major M&A activity.

I made some predictions at the beginning of the year, let’s see how they played out. Last year I was 50% correct…

  • Twitter will not be acquiredCorrect! Many people measure the success of Twitter in terms of traffic to twitter.com, but traffic isn’t what Twitter wants. Twitter is a platform and as Jack put it “Twitter’s a success for us when people stop talking about it”. I also predicted that Twitter would get their first sniff of revenue this year and they did in the form of search deals with Bing and Google.
  • Digg will not be acquiredCorrect! Digg’s appeal as an acquisition target went up threefold when they launched their innovate ad platform. No numbers have been released but as an avid Digger, the platform definitely works. I’ve clicked on my fair share of Digg ads simply because they appealed to me.
  • Apple will open up iTunes infrastructure to developers to start accepting micro-paymentsWrong! Apple did do something around payments, they enabled app developers to charge or in-app purchases in free apps. One step closer to opening up their payment platform. If Apple did this, Square would be belly up.
  • Android phones sales will not exceed iPhones, maybe in 2010Correct! AdMob’s latest metrics report, which measures ad requests not marketshare it’s clear Apple still has a substantial lead. Even based off ad requests it’s clear Android is no where near Apple and for this purpose, I’m calling it good enough.

    I guess I’m lucky that Google hasn’t released the Nexus One yet. Next year I definitely think Android will have a great marketshare than the iPhone purely based off the number of Android devices (low cost at that too) emerging.

  • Facebook connect will become more ubiquitous than OpenID as a way to login to websitesCorrect! Facebook says 80,000 websites have implemented Facebook Connect. The best number I can find for OpenID is 25,000. Yahoo will soon use Facebook for it’s social features, Facebook’s platform will only continue to grow.
  • IE6 marketshare will fall under 10% by years endWrong! IE6 still holds at 22%, and I still cry everyday.

Why Apple Needs to Make a iPhone Keyboard

Apple needs to introduce a physical keyboard attachment for the iPhone. With the 3.0, Apple gave developers access to the connector and it’s inevitable that devs will want to start supporting physical inputs in their apps. This would be so much easier if Apple said okay here’s the keyboard and here is a standardized API to use. Consumers and developers both win.

Let’s imagine Apple doesn’t do an OEM keyboard. A third party manufacture is going to fill the space but who will it be? Which apps support it? What if there are multiple keyboards that each work with different apps? Am I, as a consumer, going to have to decide which one to buy and hope my favorite apps support it?

The scenario above could be absolutely avoid if Apple puts out their own keyboard. If Apple is serious about the iPhone being a gaming platform then a gamepad would be nice too.

iPhone 3.0 now with SquirrelFish Extreme?

I saw a post on Ajaxian about how iPhone 3.0 might now include SquirrelFish Extreme so I did a quick and dirty using this. Here’s are the results (raw spreadsheet here).

iPhone 3.0 definitely has something, (whether it’s SquirrelFish or Nitro), but it’s 3x-10x faster than iPhone 2.2.

Update: Dear Apple, if this is against the NDA shoot me an email waynepan at me dot com 😉

Apple Actually Fixes A Bug, How About Another?

Earlier this year, when I was developing the AdMob iPhone Ad Units, I ran into a curious bug involving iFrames and CSS Transforms. I didn’t think anything of the bug at the time other than it just seemed wrong. We abandoned some of our ideas because of this bug so I filed it away and moved on.

Fast forward a few months to the iPhoneDevCamp where I met John Resig for the first time. We chatted a bit about the iPhone and mentioned off hand about the bug I ran across. He, excitedly, wanted to see the bug in action and I whipped up a small demo page and showed him. Later on that day he caught up with me and mentioned that he discovered that it was far more severe than he had originally thought and that he filed a bug against Apple.

That bug has now been fixed in iPhone 2.2 and Resig has a full write up here. (I don’t think Apple would’ve fixed this bug if I had been the one to report it so I’m happy that Resig was able to bring it to their attention.)

There was another bug I ran into regarding iFrames and touch events. Curiously enough, touchevents do not register properly in iFrames. This first test [http://waynepan.com/iphone/] demonstrates that you first must touch the parent document before touching the iFrame for the iFrame to register your touch event. The second test [http://waynepan.com/iphone/touchtest2.html] shows that touch events only register in an iFrame for the top ~100px of the entire page. The problem is best illustrated by visiting those links on your iPhone.

These bugs are not security showstoppers, like the click-jacking bug, but they do prevent web app developers from doing cool things in iFrames. We were originally going to use touch start, change, and end events to cycle through ads or give the user the ability to hide them. Ultimately, it was not possible because the iFrame was not receiving the proper events.

So far these have not been fixed in iPhone 2.2 and I still have bug into Apple for this (radar id: 6089245).


iPhone Web App Performance Tip – Use Inline Images

Inline images use the data: URL scheme to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and avoid increasing the size of your pages. Inline images are not yet supported across all major browsers.

Performance Best Practices at Yahoo!

Reducing the number of connections is critical for client side performance. Due to the nature of mobile and mobile networks the problem is only amplified. A low hanging fruit has always been moving to css sprites for all your graphical resources. A lot of developers haven’t moved to inline images because not all browsers support it. However, web app developers on the iPhone have it much easier. We only have one browser to worry about, and luckily for us, it’s a good one.

It means that we can safely inline images and reduce the number of requests an iPhone user has to make across EDGE/3G.

Let’s take a look at the newly launched iphone.cnet.com:

There are 26 requests total for this page. If we take all the img tags and replace the src with the base64 encoded inline image we can reduce the number of requests to 13.

<img src="http://i.i.com.com/cnwk.1d/i/wdgt/ipr/back-button-tip.png" border="0" align="left" />
<img src="data:image/png;base64,iVBORw0KGgottA ... SuQmCC" border="0" align="left" />

If we do this for all C|NET owned assets (css and js files) then we can get it down to 6 requests!

<link rel="stylesheet" type="text/css" href="http://i.i.com.com/cnwk.1d/css/rb/wdgt/iphone/iphone-reviews.css" />
<link rel="stylesheet" type="text/css" href="data:text/css;base64,Ym9keSB7CglvdmVyZmsb2F0OiBs...YmxvY2s7Cn0%3D" />

You can view these on your iPhone (or your browser) and see the performance difference:

Any iPhone web app developer can do this right now in less than 30 mins. I used Grey Wyvern’s tool, but here’s some down and dirty php code I whipped together for local files that does the same thing:

< ?php
$options = getopt('f:');

  die("\nUsage: php base64encode.php -f >filename<\n");

$ext_map = array(
  'png' => 'image/png',
  'gif' => 'image/gif',
  'jpg' => 'image/jpg',
  'css' => 'text/css',
  'js'  => 'text/javascript',
$file = $options['f'];
$ext = explode('.', $file);
$ext = $ext[count($ext) - 1];
if(empty($ext_map[$ext])) die("\nUnknown extension\n");

echo 'data:' . $ext_map[$ext] . ';base64,' 
     . urlencode(base64_encode(file_get_contents($file))) . "\n";

So get out there, optimize, and save your users some valuable time!

Update: There have been some questions of busting the iPhone cache with this technique. As was documented on the YUI Blog the iPhone does not cache items over 25kb pre-gzip. If you’re going to use this technique just be aware that external resources linked are less than 25kb.

Pandora Now Dead To Me, Simplify Media Full of Win

All the recent rumors circulating of Pandora’s demise, I started worry that my favorite iPhone app would soon be deactivated. Today, I do not care.

Why? Because I downloaded and set up SimplifyMedia. Now I can stream home iTunes library from anywhere! EDGE, 3G, WiFi, in my car, at the office, waiting in line… anywhere. My decision to save a $100 by going with the 8gb is going rather well. 🙂

Some tips for those with large iTunes libraries. Be patient and wait to Simplify to index all your music on your “server”. After that’s complete open up SimplifyMedia on your iPhone and keep it open. I was having trouble seeing all my songs on my iPhone but after I left the app open for 5 mins I was able to see my entire library.

iPhone CSS Animations Thoughts and Issues

I’ve been doing a lot of work with the iPhone lately and I’ve been holding back on blogging about my experiences because I’m unclear as to the damn NDA stipulations. NDA be damn, here’s a first in a series of posts!

If you aren’t familiar with the new animation framework that’s built into Mobile Safari you can read about the closest thing on WebKit, CSS transitions. Here is an example of a CSS transition:

<div style="-webkit-transition: opacity 2s ease-in"
This div will do a fade when clicked only Safari 3.1 or on the iPhone!
This div will do a fade when clicked Safari 3.1 or on the iPhone

Essentially you tie a timing function and duration when a css property is changed. CSS animations allow for more complex rule transitions. For example, if you want to have a card flipping effect show in this video, you will need to use CSS animations.


EverNote, How To Lose a Customer In 2 Seconds

Is it just me or is there a definite lack of a good notes application on the iPhone. The built in Notes App is almost there except it doesn’t sync with MobileMe nor can I draw freehand on it! If the Apple Notes App did that I won’t have to look for an alternative, however, I do, and I did.

I downloaded a promising looking app called EverNote. It stores everything up in the cloud and all notes are completely indexed and searchable. You can save notes by taking a picture and it will OCR them. You can even save audio notes. All this, a OS X client, and iPhone client, and it’s FREE. I’m sold so I fire up the AppStore, download EverNote, and try to enter my first note. This is what I get:

There seems to be a bug where the note you’re typing is covered which makes the primary function of the app completely useless. My bar for usability is definitely higher than the average joe, but considering this app is competing against an Apple pre-installed version EverNote’s bar should be just as high.

Meanwhile, I’ll just have to keep looking.

I Met My Hero Because of Twinkle

Last Friday, at TC’s Mobile Wars, a couple AdMobsters and I were in attendance. Somewhere between the angry audience spectrum guy and Arrington looking up from his iPhone, my co-worker Josh was Twinkling around the room. He apparently struck up a conversation with a fellow audience member, Laura and they decided to meet up with each other.

All this is unbeknownst to me but soon after, while I was waiting in line for the August Capital after-party, Josh comes up and tells me that he met some guy named Joe Hewitt and that I might know him. Joe Hewitt? The Joe Hewitt? Mr. Firebug?

Josh offered to introduce us and, like a giddy school girl, I said, “HELL YES!” So we did. Nice guy that Joe is. We chatted about some iPhone stuff, firebug, webkit animations for a bit. Unfortunately, I didn’t get a chance to ask him about Parakey and what Facebook ended up doing with it.

Maybe next time…

… and we’re up

We launched our AdMob iPhone ad units, developer contest, and publisher network. Shortly, if I can figure out if the webkit portion of the SDK is under NDA or not, I’ll be posting a postmortem on. If you watch the video below, you can see we did some amazing javascript and css stuff.

Posting From the WordPress iPhone App

I just downloaded the WordPress iPhone app and I’m tapping out a post on it right now. I mean if some of the best selling literature in japan is tapped out on mobile phones surely I can post to my blog on an iPhone!

Actually to be painfully honest it’s horrible. Apple seriously needs to open up the bluetooth and data ports on this thing. Bluetooth keyboard would simply kill all other devices put there. TechCrunch wants to build a cheap tablet pc? Why bother? And I would post a link to the rumor that Apple will release a Mac Touch but, yup, that’s right, no cut and paste.

Imagine also a joystick/pad peripheral… The iphone instantly becomes a killer gaming machine that out matches Nintendo DS and Sony PSP combined.


5 Things iPhone is Lacking vs Blackberry Pearl

Besides the obvious physical keyboard and cut and paste, here’s a list of annoyances…

  1. Easy Email Mass Delete – with my Pearl it was easy as [shift+scroll] [delete]. With my iPhone I have to tap each email… if I have 50 emails in a row I want to delete tap tap tap tap….
  2. Mark all Emails Read – not possible on the iPhone
  3. Blinky Light Notice – It was nice just glance at my Pearl and see that there was a new email or txt. On the iPhone you have to actually unlock the phone and hit the home key (if you’re not already there) to see how many emails you have. They should really put an indicator on the top bar.
  4. One Touch Bluetooth on/off – Being able to turn on/off bluetooth from the home screen of the Pearl was handy when I wanted to save battery. I don’t use a headset much so I usually keep bluetooth off. On the iPhone it’s at least 4 ‘clicks’ away to toggle bluetooth. (Yes, turning off bluetooth does save battery.)
  5. Scroll to the end/home – one key on the Pearl to get to the top of my email list, web page, email, etc… Not possible (except scrolling to the top in Mobile Safari) on the iPhone.

$199 For 3g iPhone?

I just realized why Apple is willing to sell the iPhone for $199. No it’s not the kickback from AT&T. It’s the apps! They’re undoubtedly losing money on the device and banking on the fact that people will purchase so many apps over the life of the device. Sound familiar? Yup, it’s the same business model as the video game console market.

Maybe I’m the last one to realize this…

Taking Advantage of iPhone’s Unique Control: Trism

Simply watch the video above.. This is the first iPhone app I’ve seen that takes advantage of it’s unique abilities. Imagine this game with OTA multiplayer built in! I’m a sucker for good puzzlers so I just might have to pick up the non-existent iPhone 3g.

iPhone Unlocking Rundown

I’ve been following the saga of iPhoneSimFree.com which claims to have a 100% software solution for unlocking the iPhone. So far they’re only selling licenses in bulk for $36 for 50. (That is make the iPhone accept other sim cards besides AT&T. I also find their name ironic in that it contains the word free when they’re selling the software.)

So far they’ve released videos on all major gadget blogs here and here. Except that no normal consumer has the software in hand… save one guy from UK it looks like.

With all the doubts, PR, the shady bank-wire-only-purchases by iPhoneSimFree, and Paypal pre-order only distributors I’m simply going to wait. Wait until the iPhoneDevTeam puts out their free solution. The Apple fanatics are a rabid and hack-tastic bunch, so I have no doubt that a free solutions will be released shortly.

I have a 4gb unopened iPhone sitting here on my desk which I bought for $299 when Apple.com was clearing them out. I want to use it unlocked with my T-mobile sim card so I can switch off carrying my Pearl when I don’t need all that bulk.

We’ve (AdMobsters) opened the iPhone and started hacking on it. We’re trying out this method here released by the iPhoneDevTeam. I’ve was trolling #iPhone and got everything prepared but we had to fake activate the iPhone first. Definitely learned a lot in the last couple hours and am in the middle of installing SSH required to get things going.

We activated and jailbroke using INdependence which you MUST use over iActivator if you’ve upgraded to iTunes 7.4 (which we learned the hard way =| ). Now we’re installing some stuff and will try to hack which involves some command line magic. I’m sure that tomorrow morning the iPhone Dev Team will release a nice .app and a nice GUI to automate the entire thing. We’re just impatient like that 😀

Update 2
We’ve successfully unlocked using the manual method here. There is also a GUI unlocker here.

Update 3

Here is the latest and greatest GUI iPhone Unlocker from the original iPhoneDevTeam. It unlocks your phone in 3-5 mins (the previous ones flashed in 20 mins). Tested and should work for most iPhones.

Phoneless iPhone

The phoneless iPhone iPod Touch is now official. $299 for a wifi iPod with full browser. What does this mean? Cheaper to develop, bigger audience can only translate to more iPhone specific sites!

All those iPhone sites ( facebook, digg.com, etc ) have now increased in value. Along with it, iPhone specific ad units… with wifi becoming more and more abundant this will only be a good thing for mobile.

Josh Cantone from read/write echoes the same sentiment.

iPhone xhtml Javascript Development Woes

The iPhone has been great for mobile, it’s given a full browser to the mobile world. Except for one thing, it’s Safari, which can be good and bad. It’s good for example if you’re developing an app for iPhone, you have one browser to test and develop against. It’s bad because it’s Safari, not known to be the best of browsers.

At AdMob, I’m responsible for developing the javascript ad code for our iPhone specific code. Recently we’ve been experiencing odd behavior on sites where the ad code would simply not run. We finally narrowed it down to the fact that sites were setting content type as application/xhtml+xml. When Safari is in this mode it doesn’t like you doing such things as document.createElement(‘div’) or eL.innerHTML = ‘<div>text<div>’ or even eL.innerHTML = ‘text’; all of which are normal dhtml techniques.

Instead it expects you to use document.createElementNS and document.createTextNode which are the proper way to add XHTML elements. So I ended up having to rewrite our entire iPhone javascript code and a simple nifty utility function. 🙂

  var createElement = function(type, props, styles) {
    var d = document.createElementNS('http://www.w3.org/1999/xhtml', 'html:' + type);

    for(var i in props)
      d[i] = props[i];

    for(var i in styles)
      d.style[i] = styles[i];

    return d;

  // usage
  eL.appendChild(createElement('div', { id : 'divId' },
        { float : 'left', width : 100px' }));