Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

Home Tutorials
webOS Tutorials

Add snooze functionality to the webOS Clock: Sprint DevCon tutorial

Today at the Sprint Developer Conference, Palm's Matt Hornyak, the lead engineer responsible for the webOS phone app and Clock that ship with the Pre, gave a tutorial on how to change the length of a snooze alarm in the Clock app. This was done in just five minutes in front of a live audience of about 500, and was running on the device by the end of his presentation.

The PDN Blog posted a "sneak preview" of the code used to add the snooze feature to the clock, with Hornyak's annotations in boldface. Definitely worth a look for JavaScript and Mojo gurus who have a hard time getting out of bed.

According to the conference schedule there's an upcoming Palm Keynote from developer relations tomorrow, so we should have more webOS news soon. Palm promises an article later with detailed instructions on how to add this feature, but for now here's the code to play around with (after the break):



Make sure your webOS apps are Pixi-ready

As the release of the Palm Pixi nears, it's clear that the Pre won't be the only webOS kid on the block. A recent post on the PDN Blog by Chuq Von Rospach gives you some tips on building your app to run on both the Pixi and Pre, adapting it to work properly and look good on both devices. For those not in the loop, the only two "significant differences" that devs should be aware of are:

  • Pixi’s display resolution is different - it’s 320×400 pixels, as opposed to Pre’s 320×480
  • Pixi doesn’t have WiFi

The first point is not as much of a dealbreaker as some would expect, because if your application presents content and interface elements in a list-like (or vertically stacked) layout and makes use of Mojo widgets, it should still work fine on the Pixi. However, full-screen apps, such as some games, will need to be approached with layout flexibility. Thankfully, Palm’s Human Interface team has you covered, with a handy flexibility responsiveness document available for download. Your app can then be tested on the Palm Emulator, running at 320×400. They explain how to do that here.

In regards to the lack of WiFi on the Pixi, few apps should be affected (except those that depend on WiFi, such as desktop sync apps). To alter your app’s behavior based on the presence/absence of WiFi at any given time, you can also use the Connection Manager API to check whether a WiFi connection is active.

By making sure your apps are Pixi-certified, you should be ready to appeal to the Pixi market right from the get-go!



New immersive webOS app guidelines

If you're wanting to provide users with an "immersive and customized" experience with your app, folks from the Palm UI design team has some advice on how to make sure your webOS app gets noticed when submitting to the App Catalog. While reviewing immersive apps (commonly games that utilize fullscreen mode), the review team noticed the following, writes Chuq Von Rospach:

  • Immersive app developers commonly use custom controls (instead of standard webOS framework controls).
  • Immersive app UI designs (especially for games) are complex, and commonly contain tap targets that are smaller than what we recommend (minimum size = 48 pixels).
  • Immersive app developers commonly include buttons in their UI that navigate to different scenes in their app hierarchy, including buttons like “Back,” “Next” and “Home.”
  • Performing the back gesture feels “natural” when in Portrait orientation, but not in Landscape.

So after much consideration, in addition to the updated Application UI Checklist, immersive app developers should take note of the following list after the jump:



Palm webOS: Application Basics (by Mitch Allen) - Webcast video (UPDATED)

For those keeping up with Palm Software CTO Mitch Allen, you may be aware that he recently hosted a webcast a couple of days ago titled Application Basics, based on Chapter 2 of the new O'Reilly Palm webOS book. Back in February, we covered his first webcast, titled Developing Applications for webOS: a Preview, in which he went over the intro material in Chapter 1. You may also remember that Allen helped kick off PreDevCamp last month. The next webcast, Unit Testing in Palm webOS, came in July by way of Christian Sepulveda, VP of Pivotal Labs (and one of the Pre launch partners).

If you missed this one, don't fret; the webcast is part of a series (so we can expect to see more), and you can watch the video below. Advanced webOS devs will likely find a lot of familar material here, as Chapter 2 goes over the basic app structure and core SDK dev tools, before delving into an early version of the News app from the book. Eventually, Allen will be guiding us through the creation a complete application. From O'Reilly:

This webcast can be viewed as a companion to the book, Palm webOS: The Insider’s Guide to Developing Applications in JavaScript using the Palm Mojo(tm) Framework, but does not require the book, and is intended for any developer interested in building webOS applications. Each webcast will cover concepts and background material, followed by a detailed example built using a sample application, News. Over the course of the series you will step through the construction of the complete application.

We will keep you posted on future webcasts as they are announced.

UPDATE: The last 15 minutes of the webcast video is missing; O'Reilly is aware of the issue, and a full, revised video should be up by Tuesday.

UPDATE #2 (09/18): The complete video is now available (in two parts) below.



Webcast: Unit Testing in Palm webOS with Christian Sepulveda, Pivotal Labs

Back in February, Palm CTO Mitch Allen hosted the first webOS developer webcast, titled "Developing Applications for webOS: A Preview" (see a summary and video of the event). During the webcast, he went over the material in the first chapter of the upcoming Palm webOS book, including Stages, Scenes, UI Widgets, and more, and answered questions from developers during the Q&A period.

Today, Christian Sepulveda, VP of Business Development for Pivotal Labs, hosted a webcast today on Test / Behavior Driven Development (TDD/BDD) through Jasmine, a BDD framework for JavaScript. He was joined by Davis Frank, one of the developers at Pivotal Labs who has been working with the Pockets and Jasmine framework of their webOS apps. Over the course of the hour, he gave a brief intro to unit testing, an overview of Pockets and Jasmine, and unit testing in action.

Watch the full 55-minute webcast (in code-readable HD!)

For those unfamiliar, Jasmine is a unit test framework for JavaScript (not exclusive to webOS), but doesn't require a DOM. Pockets is a set of tools and libraries to facilitate webOS development, including a GUI test runner for webOS Jasmine testing. They have been using Pockets internally and for the pre-release SDK, and is set for a wider launch later this summer. Sepulveda then breifly described testing concepts and the difference between tests and specs.

For the demo, Sepulveda walked us through the code for testing a very basic Twitter app, used to search friends. Fast forward to 7:40 to get right to the demo. Those with basic knowledge of JavaScript, webOS and unit testing should find the webcast quite insightful. You can watch the full HD webcast above. After viewing the demo, how do you feel about the potential for unit testing in webOS, and if you're in the Early Access Program, have you had the opportunity to check out Pockets?

Screenshots from various stages of the testing process are below:

Full summary of the webcast Q&A after the break!



  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  4 
  •  5 
  •  6 
  •  7 
  •  Next 
  •  End 
  • »

Page 1 of 7