Familiarize Yourself with the Technologies

HP webOS hardware devices contain many sensors which you can take advantage of in your applications. Here's a quick overview of each one.

Touchscreen

A capacitive touchscreen allows users to touch the screen to interact with applications, instead of having to use other things, like pens or 5-way controllers. The user can:

  • Tap buttons, menu or list items

  • Double-tap to perform actions like zoom in/out

  • Flick to scroll through lists, or quit an application

  • Swipe to the right in lists, to delete items

  • Touch & Drag, to scroll

  • Touch & Hold, to enter "reorder" mode. Then drag items to move them.

  • Spread/Pinch using 2 fingers, to zoom in/out on a web page or a picture

  • Touch with 2 fingers and rotate - to rotate content

Gesture Area

An area below the touchscreen allows various user gestures to accomplish certain tasks. One of the most important gestures is called the "Back" gesture. It is a short, quick swipe from right to left, over the center button.

Sensors

Orientation

  • Sensors report the device's orientation. When a user moves, rotates or tilts the phone, the device reports the change, and your application can respond to it. Here are some simple examples:

  • Launch the Web application. While holding the phone up vertically, type in a URL and view the page. Now turn the phone 90 degrees, to widescreen orientation. The Web app senses the event and redraws its content in widescreen format.

  • Launch the Contacts application. While holding the phone vertically, create a contact and, while editing it, turn the phone 90 degrees to the right. The Contacts app ignores the rotation because there's no particular value to the user to draw the UI in widescreen format.

  • When developing your own application, consider whether there is value in responding to a rotation or orientation change. If so, you can take advantage of any of that data.

    • Currently, the webOS platform reports the following rotation and orientation events: 0, 90, 180, and 270 degrees, & faceUp, faceDown.

    • As development continues, a complete set of positional events and data will become available to you, so your app can take advantage of motion events in all directions.

    • This data will be particularly useful for game developers, who can use device rotation/orientation values to allow users to "navigate" through three-dimensional gaming environments.

Proximity Sensor

A webOS device knows when something comes close to it, and reports that event via the OS, so an application can respond to it.

  • The Phone app uses the Proximity Sensor value to turn the screen off when a person holds the phone close to their face. This is done to prevent the user from accidentally pressing buttons with their cheek while talking on the phone.

Location services

An included GPS radio uses satellite data to report the current time and determine the current location. Your app can make use time and location data to serve your users better.

  • An application that find movies in your area, in the next 3-hour time window.

  • A map application that can display the traffic near your current location

  • A picture application that automatically adds the time, date and location where it was taken

webOS Platform APIs

The webOS development environment provides you with APIs that allow you to create UI using standard controls, use JavaScript to make that UI do powerful things (like access hardware services, launch other webOS applications, and make use of their data). You can see an example of how this works in the Contacts app. You can tap a contact's phone number to call them using the phone app. Tap their address to display it in the Maps app, and so on.

HP webOS: A Rich Software Development Environment

One of the major goals of the HP webOS platform is to make it possible for you to create great mobile applications that deliver the richness of a desktop user experience on a mobile device. And we did that by:

  • Building an OS on industry-standard technologies

    • The webOS operating system is built on webKit, the code which is underneath many of today's best web browsers. It's solid, open-source, and provides you with a great foundation.
  • Extending the OS, so you can do more in your applications

    • The webOS operating system connects to all of the amazing hardware technologies that webOS devices have and makes them available to you, so your app can take advantage of them.

    • The webOS development platform contains the Mojo Framework classes, which provide the following:

      • A comprehensive set of desktop-class UI controls. Including controls you can't find on other platforms, such as:

        • A customizable application menu
        • Text edit commands like Cut, Copy, and Paste
        • Popup menus and more
      • Cascading Style Sheets (CSS) you can use to quickly customize the look of your application.

        Applications like Email and Contacts use the webOS platform's default style, whereas apps like Music Player and Camera use the "Dark" style. You can use either of these, or create one of your own, to create your own look.

  • Using a "development language" you already know

    • HTML/DHTML & CSS

      To render the "pages" in your application, and make them look wonderful.

    • JavaScript

      To make the buttons, menus, lists, etc. in your application do something useful.

    • HTML 5 DB

      To store data locally on the device.

    • AJAX

The goal was to create an application development environment where anyone -- from the first-time website developer to the most-seasoned application developer -- can design, implement and deliver a mobile application.

Designing webOS Applications

At its core, the webOS operating system and its applications were designed to allow users to interact naturally and simply with their phone. Everything works together seamlessly. It's simple for users to manage the various aspects of their lives -- from personal items to work items, tasks to entertainment, and the list goes on and on. The goal was to ensure that their phone feels like the best personal assistant they could have ever wished for, because it helps them stay on top of the things that matter -- appointments, communications with others, errands -- and even provides ways for them to relax and enjoy themselves with a little music, movie-watching or web-browsing. The goal was to create a device that becomes truly indispensable, something that a user can't ever imagine living without.