Multitasking and iPhone OS

You can’t believe how many times I’ve been asked if you can listen to music while browsing the web on the iPad. Or rather, I’ve been “told” that this was the case, with varying levels of certainty.

As anyone who has ever used an iPhone for more than 15 minutes knows very well, this is simply not true. You can listen to your music while browsing the web. In fact, you can do much more.

Multitasking is the ability of an operating system to run multiple processes (tasks) at the same time1. The last non-multitasking operating system I used was MS-DOS. Of course other single-tasking OSes have been released after DOS2, but the iPhone OS is, and has always been, a multitasking OS.

What this means is that the iPhone, and therefore the iPad, is capable of running multiple applications simultaneously. In fact, 20 applications are running simultaneously on my non-jailbroken iPhone 3GS right now3.

So, to answer the question explicitly: yes, you can listen to music while you’re browsing the web on the iPad. iPod is always running in the background, even if you’re not listening to music. Mail also always runs in the background, so you’ll be notified when you have new mail. Finally, thanks to push notifications, you’ll be able to receive Facebook notifications, MSN messages, etc. while you’re reading an academic paper, writing an email, or browsing the web.

Restrictions

So, what is this “lack of multitasking” people can’t stop talking about? Apple does not allow third-party applications downloaded from the App Store to run in the background. The reason for this is simple: battery life. When an application is running in the background, it uses the CPU, and therefore drains your battery.

Battery life is very important for a mobile device; everyone wants more battery life. But everyone also wants lighter devices. Otherwise, Apple could always build an iPad that has 100 hours of battery life but weighs 5 kilos.

Let’s consider how we use multiple applications simultaneously on our computers: we either have some applications (email/IM client, music player, etc.) running in the background, or we have a two or more applications running side-by-side on the same screen (a web browser and a word processor, for example).

Push Notifications

As I’ve said before, your email client and music player are already running in the background on the iPhone OS. Technically, you can’t run IM clients in the background, but thanks to push notifications, you’ll continue receiving your messages. Apple actively encourages developers of such applications to take full advantage of push notifications, and almost all such applications (Facebook, all important IM clients, some games, etc.) already support them.

I agree that push notifications aren’t perfect, and that they don’t work for all applications. For example, a Twitter client could check for new tweets periodically if it could run in the background (and this is what most desktop Twitter clients do), but it’s infeasible to use push notifications for Twitter4.

Be that as it may, I argue that responsiveness and battery life are still more important for most users. The iPhone’s CPU simply isn’t powerful enough to run more than a couple of third-party apps in the background and still maintain the responsiveness of the frontmost app. If, however, the new A4 chip is powerful enough, Apple could let at least some third-party apps run in the background and leave the decision about battery life to the user.

Now, let’s focus on the case where you run two or more applications side-by-side on the same screen.

While realizing that this might be an issue for some people, we also have to realize that iPhone OS devices (iPhone and iPad) do not have enough screen real-estate to fit two or more applications and the keyboard on the screen, and still remain usable5. The iPad’s screen has a resolution of 1024 by 768 pixels, while the iPhone has less than 20% the number of pixels with a 480 by 320 pixel screen. These resolutions almost halve when the keyboard is displayed.

In lower resolutions like these, you switch between applications instead of running them side-by-side. This is what everyone was used to doing before high-resolution displays became commonplace a few years ago. Most netbook users I know still complain about, among many other things, being unable to fit two windows on the screen.

Full Persistence

There’s still one fundamental difference between iPhone OS devices and general purpose computers, though: you can’t minimize or hide an application on the iPhone OS. But here comes the best thing since sliced bread: full persistence. Apple uses full persistence in all their iPhone applications, and encourages all iPhone/iPad developers to do the same.

But what does full persistence mean? It means when you quit and relaunch an application, the application will be in whatever state you left it in. If you quit Facebook while you’re looking at a friend’s profile picture, Facebook will be showing your friend’s profile picture the next time you launch it. If you were in the middle of a sentence when you quit Notes (or Pages), you will be at the same place, having lost not a single word, when you relaunch it. This is known as full persistence, and it blurs the line between minimizing or hiding an application and quitting it.

Of course, I have to admit that the current state of full persistence on the iPhone OS isn’t without its problems. The most important issue is that not all applications support it. The main reason behind this is that it’s a lot of work to implement full persistence for a reasonably complex application. However, I expect Apple to add OS-level full persistence support in the near future.

Another problem is that there’s no Command-Tab equivalent; you have to go through the home screen to switch between applications. I also expect Apple to provide an easier method for switching between applications, at least on the iPad.

Conclusion

Apple has very valid reasons for restricting multitasking on the iPhone, and I don’t see them making any changes with regard to multitasking on the iPhone anytime soon, at least with the current iPhone devices. Some of these reasons are less valid on the iPad, and I believe Apple will at least make this restriction much less noticeable in a future software update, possibly 4.0.

Finally, TidBITS has recently published an article on the same issue entitled “Does the iPhone OS Need Multitasking?,” which is well worth a read.

P.S. First post in 10 months. I’m back, baby!


  1. Or more precisely, create the illusion of doing so, but I shall not go into further detail. If you want to learn more about multitasking, you can read the Computer multitasking article on Wikipedia. 

  2. The most notable one being Palm OS

  3. Here’s the list from iStat: kernel_task, launchd, syslogd, lockdownd, mediaserverd, mDNSResponder, IQAgent, fairplayd, configd, accessoryd, SpringBoard, CommCenter, BTServer, notifyd, MobilePhone, SCHelper, MobileMail, apsd, MobileMusicPlayer, iStat. 

  4. Some Twitter clients on the iPhone use push notifications. Echofon (formerly TwitterFon) is one such client, but it only notifies the user of direct messages and @replies made by other Echofon users. 

  5. Note that Apple has a very high bar when it comes to usability. 

Product Mis-placement

From Wikipedia:

Product placement, or embedded marketing, is a form of advertisement, where branded goods or services are placed in a context usually devoid of ads, such as movies, the story line of television shows, or news programs.

Now that we know what product placement is, let’s see what it’s not.

Product placement is not putting your logo on other companies’ products:

Microsoft product placement in Knight Rider

Microsoft product placement in Knight Rider

…and it’s definitely not allowing the use of a cheap imitation of your primary competitor’s product in a show you basically own (more on the iPhone clone on Gizmodo):

Fake iPhone in Knight Rider

Fake iPhone in Knight Rider

Don’t be mistaken, I’m not surprised, not even a bit, because apparently Microsoft decided to take some weight off Apple’s shoulders by advertising how cool Macs are. You see, when you spend your money and time on creating insanely great products, not only do you get free product placement from prime-time shows and blockbuster movies1, you also get your competitors to do the advertising for you.

But at least one product placement deal was made before Microsoft decided to consciously ruin its business not only by producing the crappiest software this world’s ever seen, but by also spending the better part of its advertising budget to help Apple:

Microsoft Surface in The Day the Earth Stood Still

Note that Windows, Microsoft’s flagship product, is nowhere to be seen, except for a fraction of a second in The Day the Earth Stood Still. The only thing we seem to have is a couple of stickers and a $12k non-consumer product.

Before I finish my words, I would like to use this opportunity to personally thank Mr. Gates and Mr. Ballmer for their mind-blowing stupidity. They really make life much easier for people like me.


  1. 24, CSI:NY, Heroes, House, Las Vegas, The O.C., The Office, Sex and the City, need I say more? 

What to Expect from the App Store

It’s been 12 days since ek$i sözlük appeared on the App Store.

It became the top downloaded free application in the Turkish App Store on its 6th day, but it’s hard to stay on top when a free VoIP application (coughSkypecough) gets released the day after your app becomes #1.

Top Free Apps

ek$i sözlük is still #5 in the Turkish App Store, and even this is fantastic. I wrote ek$i sözlük solely for myself, and I never thought this many people would download, use and like it.

In the 12 days since I released 1.0, I already pushed a bugfix release (1.1), and I’m getting ready to push 1.2 with a new name and icon, as requested by ek$i sözlük’s lawyer (more on that in a few days).

Anyway, enough advertising.

After the release, I started receiving a lot of questions about the App Store and iPhone development in general, from people who apparently didn’t know I’d been developing for the platform for a while, or were simply impressed by ek$i sözlük’s success.

Today, I’ll try and answer one of the most frequently asked questions by sharing the sales graphs for the first 11 days. Your mileage will vary, but I assume this will give you a rough idea of what you can expect from a free, niche application:

Sales Per Day

Sales per Day

Cumulative Sales

Cumulative Sales

As always, feel free to share your thoughts in the comments.

Some Clarifications Regarding the iPhone 3.0 OS & SDK

The iPhone 3.0 Beta SDK & OS announcement left many practical questions unanswered, and I will try to answer some of these questions here.

Availability

The iPhone 3.0 Beta SDK & OS are only available to paid, registered iPhone developers. Even if you were to get your hands on a copy by other (illegal) means, you still wouldn’t be able to use the 3.0 OS, because it requires activation through the developer portal.

The 3.0 SDK, on the other hand, can be used by anyone, but I don’t think there’s a registered developer stupid enough to risk his agreement with Apple.

Moral of the story: there’s a reason why it’s called a beta. Wait till June if you’re not a developer.

Downgrading

Once you upgrade to the 3.0 OS, there’s no going back to 2.x. There are people who claim to have downgraded their iPhones to 2.x using the DFU mode, but I can’t confirm this (and it’s definitely not approved by Apple).

Dedicated Computer

John Gruber and others have wondered if the 3.0 SDK must be installed on a separate computer if one wants to continue developing applications for 2.x. This is simply not true, as I have tested and confirmed. You can develop applications for 2.x and 3.0 on the same machine.

Installing the 3.0 SDK in a separate location is an option, but definitely not necessary.

If you have any questions regarding the iPhone 3.0 Beta SDK or OS, don’t hesitate to ask them in the comments and I’ll try and answer them as best as the NDA allows me.

The Hiccups

In Summer 2006, I purchased a Flickr Pro account. I was in the US at the time, and Flickr seemed like the easiest way to share my photos with my family and friends back in Turkey.

After I returned to Turkey, I didn’t use Flickr all that much, so I let my Pro account expire, and I didn’t renew it until that unfortunate day in late 2007 when both my internal and external HDDs crashed. Fortunately, I had backups of the most important stuff, and the Apple guys were able to recover all my data from the internal HDD. However, I didn’t have backups of the photos I took in the US, so I turned to Flickr.

As annoyed as I was about the fact that I had to renew my Pro account just to be able to download my photos, those photos were worth more than $25 to me, so I renewed my Pro account. I downloaded all my photos immediately, and made proper backups. As for Flickr, I said “this is it, I’m not renewing a second time.”

And I didn’t, until today. For some reason, I found myself browsing Flickr and uploading photos in the last few days. It felt nice, and I wanted to upload some more photos. So I went ahead and renewed my Pro account for the second time.

As it turns out, renewing wasn’t my best decision. Just after uploading a new batch of pictures, I was granted with this message:

Flickr has the hiccups

Hiccups? That’s just great. So I paid $25 for hiccups? And what the heck is “hiccups?” Is this some sort of joke? Is it supposed to be funny or cute? Sorry but I can’t see it.

And it’s not just a one-time thing, either. The darn message is everywhere. From my photostream to the support pages. Flickr is completely unusable.

Now, I have a few words of advice to anyone who charges for their software/service. The moment you part your clients/customers/users with their hard-earned money, you forfeit your right to “have the hiccups.” You might have technical difficulties (not the “hiccups”), and I have the right to a full refund. This is called “defective goods.” You can’t just say the payments are non-refundable and walk away with my money.

I will request a full refund from Flickr, and I will send them a link to this post (if I can open the support pages, that is). I will post updates if/when they reply.

UPDATE 1: Got a reply from Flickr, rejecting a refund. I requested the customer representative consult with a superior.

Another interesting detail was my IP address and browser/plugin details being included in my original message. I pointed out that I didn’t agree to sending that kind of information.

Logitech MX Revolution Dissection

NOTE: Do not try this at home kids, you will destroy your mouse.

So, my 2-year old MX Revolution mouse started acting erratic in the past few days, and I decided the time has come to replace it (probably with another MX Revolution or an MX1100).

Like I do with almost all my dead equipment, I opened it up just for the heck of it.

Here are the pictures:

Logitech MX Revolution Logitech MX Revolution Logitech MX Revolution Logitech MX Revolution

Adding Directional Antenna and Multiple Interface Support to ns-2.33

Following this post, I ported the directional antenna and multiple interface support from TeNs to ns-2.33.

You can download my patches, and re-compile ns-2.33 to enable support for directional antennas and multiple interfaces. Don’t forget to set the NS_ANTENNA_FILE environment variable.

Assuming $NS2 points to the directory where you have the ns-2.33 sources, and that you’re using the ns-allinone-2.33 release, here’s what you have to do:

cd $NS2
patch -p1 < dir-antenna.patch
patch -p1 < multi-if.patch
./configure --with-otcl=../otcl-1.13 --with-tclcl=../tclcl-1.19
make
export NS_ANTENNA_FILE=$NS2/mobile/antenna.txt

Google Quietly Tweaks Gmail Buttons

I just noticed that Google quietly tweaked the look of the buttons on Gmail. The new look resembles Cocoa’s segmented controls, and is definitely a welcome change on my part.

Gmail's New Buttons

Four Twitter Clients for the iPhone

Twitter and the iPhone are a match made in heaven. My Twitter client is one of the three most used applications on my iPhone (the other two being Phone and Mail), and I actually think I use it more than Phone.

Today, I review four Twitter clients for the iPhone: Tweetie, Twinkle, TwitterFon and Twitterrific.

Grading Criteria

I reviewed and graded each client (except Twinkle, but more on that later) according to two sets of criteria. The first set is the set of features commonly found in Twitter clients, such as deleting tweets or following new people.

The other set is my own, personal gripes with most Twitter clients, and all iPhone apps in general. This set includes criteria like being able to determine my location correctly, using the correct date/time format according to my locale, and scrolling speed.

Tweetie

Tweetie

Tweetie is a relatively new contender in the iPhone Twitter client arena, but it has an almost fanatic following (including John Gruber), making it the second most popular paid social networking app in the App Store (as of this writing).

I had some major gripes with Tweetie 1.1, and most seem to have been resolved with 1.2, but two important issues remain:

  1. Tweetie cannot determine my location correctly

    Well, actually it can, but for some reason it doesn’t translate my location to a city name, and just sets my location to “iPhone: <latitude>, <longitude>.” As it turns out, and much to my surprise, the only Twitter client capable of determining my location correctly is Twitterrific.

  2. Tweetie doesn’t use the correct date/time format. (See update)

    Tweetie is the only Twitter client I’ve tried that doesn’t use relative times. Instead, it displays absolute times, and unfortunately, it fails to display these in the correct format. The previous version displayed all date/time information using the US locale, and 1.2 is even worse: the day names are in Turkish, but it still uses the US format (e.g. Pzt 7/28 4:20 PM).

    I can’t say this is a showstopper, but proper localization is key to a successful Mac application, and iPhone applications are Mac applications. Attention to small details is what makes us Mac users, and I got a news flash for Tweetie developers (and all other developers who don’t care about proper localization): there’s life outside the US, and we don’t use a 12-hour clock or write the month before the day. You should have fixed these before the 1.0 release, but you’re already at 1.2 and localization still sucks.

Grade: 8/10

Twinkle

Twinkle

Twinkle is one of the first Twitter clients on the iPhone. It was available before the App Store (and the SDK), so I used it for quite some time, and I was very happy with it.

After the SDK and the App Store revolution, I installed Twitterific and didn’t try the new Twinkle until this review. Well, actually I still haven’t tried it.

The new (post-SDK) Twinkle requires you to sign up for a Tapulous account. This is apparently because Tapulous is trying to build a FriendFeed-like network, and therefore Twinkle is somehow “part of a bigger plan.” Twinkle developer Tristian O’Tierney explains:

What many people want is just a Twitter client, and I’m sorry to say as a basic design decision, that’s just not what Twinkle is or is meant to be.

Well, I’m one of those many people, and as much as I like Tap Tap Revenge, I’m not signing up for yet another account just be able to post and read 140-character messages. No thanks.

I really wanted to know how Twinkle held up against the competition (and I still do), but apparently Twinkle is not just a Twitter client anymore, and is therefore disqualified.

Grade: 0/10

TwitterFon

TwitterFon

I tried TwitterFon after a recommendation by a friend, and I honestly didn’t think I’d like it this much. It has all the features (with the exception of multiple accounts) one could wish for in a Twitter client, and it’s free.

I can say that Tweetie has a slightly better-looking UI, but TwitterFon uses relative times, and therefore doesn’t suffer from improper localization. For all I can say, TwitterFon is at least as good a Twitter client as Tweetie.

Grade: 8/10

Twitterrific

Twitterrific

Twitterrific is the Twitter client for the Mac, and I’ve used it intermittently since its debut.

I downloaded the iPhone version the day it was released, and I was surprised to see how different (in a bad way) it is from the desktop version.

All lacking features aside, Twitterrific for the iPhone has the worst user experience among the four clients I’ve reviewed, and scrolling is excruciatingly slow. This may be partly due to the ads, and there’s an ad-free premium version for $9.99, but that’s the only difference between the two versions, and I think $9.99 is a ridiculous price to pay for a Twitter client, especially one that lacks critical features and has a mediocre user experience.

Special question to the Twitterrific team: how high were you when you decided to use “double tapping?” Thanks.

Grade: 4/10

Feature Matrix

Tweetie TwitterFon Twitterrific
Multiple Accounts
Delete
Follow
Search
Favorites
@Replies
Direct Messages
Re-tweeting
Correct Location
Ad-free
Intuitive UI
Scrolling Fast Fast Slow
Price $2.99 Free Free

Conclusion

There’s a tie between Tweetie and TwitterFon. They’re both good Twitter clients, but there’s always room for improvement: TwitterFon could use a bit more polish, and Tweetie developers have to fix the localization problems.

If you’re American or you just don’t care about the small details (ie. you use Windows), please go ahead and buy Tweetie. You’ll be supporting an indie developer ($2.99 is not much, in all probability you paid more for your lunch today).

On the other hand, if you just want a good, free Twitter client, and don’t have multiple Twitter accounts, use TwitterFon.

As for me, I’m currently using Tweetie, and I hope the localization problems will be gone with the next release. If they aren’t, then I’m switching to TwitterFon for good.

UPDATE (Feb. 4): I got an email from Loren Brichter, the guy behind Tweetie, the day I published this post, and he wanted to know more about the localization issues. We discussed (well, most of it was me ranting) the issues at length, and he said he will try and fix them in 1.3.

I would like to thank Loren again for the quick response and consideration.

Palm Announces Pre

Yesterday, Palm announced its new smartphone, the Pre, at CES.

Now, if I thought Pre was just another iPhone wannabe (like the Samsung Omnia or the BlackBerry Storm), I would have just bashed it on Twitter, but it’s not.

Palm, which was a sinking ship until yesterday, seems to have created the first real iPhone competitor, and even if the device turns out to be not-so-great, I think there’s a lot to be learned from webOS’s (Pre’s new operating system) user interface concepts, even for Apple.

OSNewsThom Holwerda seems to agree with me on this one:

To me, it seems as if Palm is the first smartphone manufacturer to develop an interface from the ground up specifically for a mobile device, without windows, applications, or other desktop-centric ideas. Oh, and it does copy/paste. While it’s dangerous to make any such statements, I do believe that Palm has out-Appled Apple on this one: the iPhone already feels hopelessly kludgey and outdated.

See the Pre in action for yourself in Ars Technica’s hands-on video:


Ars Technica first hands-on with the Palm pré phone from Ars Technica on Vimeo.

Now, the question of the evening: would I buy a Pre? Unlikely. I’m a sucker for everything Apple makes.

Do I promise not to bash it if it turns out to be a piece of crap? Absolutely no. But I think Palm brings new breath to the smartphone market with the Pre (instead of blindly copying Apple like everyone in the industry has done for the past 33 years), and that’s enough for me to like it.