Friday, 22 April 2011

Quick tip: display notification for long running background tasks

This is a very simple guideline but to my surprise I've encountered few apps lately that seem to ignore it. In short the guideline is:
Whenever your app has something long running in background, for example downloading something, always display an icon in the notification bar that tells user about it. Taping the notification should take user to a page where they can easily cancel the task.
Probably the best example of the correct way of doing this is the Android Market app. It shows an icon when an app is being downloaded and a different icon when it is being installed. Also, taping the notification takes you directly to the corresponding page in the Android Market app.

Downloading and done (see notification bar):

The notification deep links to the relevant location of the Market Place app:



As a bad "don't do this" example we can look at the comics app. When downloading comic books only indication of the background process is the percentage in download button. If you leave the app you have no way of knowing what is going on even though the app is actually downloading in background. There's also no way of canceling the long running background process.