Chapter 10. Background Applications

Until now, mobile and web applications have generally been limited to a single window, within which the user moves from view to view, reading content, performing tasks, and providing input in a serial fashion. With Palm webOS, mobile applications can anticipate the user’s needs by using notifications while running in the background, and they can put common tasks into separate windows for quick access when needed.

Mojo includes a sophisticated notification system that supports banners and pop-ups, which allow you to display information subtly or get the user’s attention with more urgent messages. In this chapter, you’ll be introduced to notifications and dashboard summaries, with code examples of each to show you how to use them in your application.

Advanced applications are built around an application assistant, which coordinates the application’s stages, handles background tasks and launch requests, and provides general command handling for the application. This structure lets you build multistage applications with secondary cards or dynamic dashboard stages, and run your application in the background, waking the device from sleep or across reboots of the device.

Even applications that don’t wake the device will want to adapt their behavior when running in the background. There’s no need to waste CPU cycles or battery to update the display or to frequently update data while the user is looking or working elsewhere. This chapter will ...

Get Palm webOS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.