Antair Nightstand 1.6
Antair Nightstand 1.6 for the BlackBerry PlayBook is now available.
This release introduces the news functionality, adds a new animated theme called Daydream, and has several other improvements.
The Daydream theme displays the clock and weather information over a background of animated lights.

The News feature allows you to view local and international news directly from Nightstand.

The new Antair Nightstand is available in the BlackBerry App World.
Here’s a brand new video of Antair Nightstand, with the new theme and news functionality.
A Thought Experiment

How would the world change if everyone was the same height?
Everyone born from now on reaches 5’9″ at the age of 18. In a few generations, all adults are the same, exact height.
How would the world change? What would be different?
Perhaps the fashion industry would need to be altered (see? see!? clever, maybe), and perhaps basketball wouldn’t be the same game…
But would anything else of significance be different?
Antair Nightstand 1.5
Antair Nightstand 1.5 has been released for the BlackBerry PlayBook.
This release introduces two new animated themes.
The first, called Orion, has a beautiful background of a nebula, and features animated stars.

The second, called Fairies, features a relaxing scene with an animated moon and animated glowing fairies.

Here is a short video of all the themes in Antair Nightstand 1.5
Antair Nightstand running on a BlackBerry PlayBook
Here’s a short video we shot today of Antair Nightstand running on a BlackBerry PlayBook.
The Terminal theme really took a while to get right. As with the Digital Original and Blue Lagoon themes, the app needed to feel like a physical component from the real world that it was trying to mimic. But as where with Digital Original and Blue Lagoon, the app emulated the pixelated feel of a physical alarm clock, which is still a piece of consumer electronics, the Terminal theme needed to emulate something really physical; a panel of digits that physically flip over, as seen in airport or train station terminals.
After a *lot* of coding and experimentation and maths of various sorts, I think we finally got it right. Take a look:
Listening to address book changes in your BlackBerry app.
Your BlackBerry application needs to know when the user adds, removes, or changes something in the BlackBerry address book. So, how would you go about implementing this?
Here is a simple class that will listen to changes in the BlackBerry address book:
import java.util.Enumeration; import javax.microedition.pim.Contact; import javax.microedition.pim.ContactList; import javax.microedition.pim.PIMItem; import javax.microedition.pim.PIMList; import net.rim.blackberry.api.pdap.PIMListListener2; final class MyPIMListener implements PIMListListener2 { public void itemAdded ( PIMItem item ) { if ( item == null ) { return; } Contact contact = (Contact)item; // ... } public void itemRemoved ( PIMItem item ) { if ( item == null ) { return; } Contact contact = (Contact)item; // ... } public void itemUpdated ( PIMItem oldItem, PIMItem newItem ) { if ( oldItem == null || newItem == null ) { return; } itemRemoved(oldItem); itemAdded(newItem); } public void batchOperation ( PIMList list ) { if ( list == null ) { return; } try { ContactList contactList = (ContactList)list; Enumeration e = contactList.items(); while ( e.hasMoreElements() ) { Contact contact = (Contact)e.nextElement(); // ... } } catch ( Exception e ) { // ... } } }
To use the above class, you need to add an instance of it as a listener to the BlackBerry contact list. Here is how you would do that.
MyPIMListener listener = new MyPIMListener(); ContactList contactList = (ContactList)PIM.getInstance().openPIMList( PIM.CONTACT_LIST, PIM_READ_ONLY); BlackBerryPIMList blackberryContactList = (BlackBerryPIMList)contactList; blackberryContactList.addListener(listener);
Our second app for the BlackBerry PlayBook
Antair Sudoku is now available for the BlackBerry PlayBook, as well as for the Mac.
First product for the BlackBerry PlayBook
We just shipped our first product for the BlackBerry PlayBook.
It’s called Antair Nightstand, and it’s one of the prettiest pieces of software I’ve ever worked on.

We designed the application to look and function just like a standard physical nightstand alarm clock. We made it feel like it’s actually glowing in your bedroom when the lights are off, and if you look closely enough, you could just make out the individual glowing LED squares.
We included two themes. Standard Digital, and Blue Lagoon.

As convenience features, we added several alarm sounds, and an extra large snooze button.
Antair Nightstand is available for the BlackBerry PlayBook, and can be purchased from the BlackBerry App World.
Introducing Antair Sudoku for the Mac
Antair Sudoku for Mac is now available.
Check it out at Antair Games, or grab your copy directly from the Mac App Store.
How do you switch screens in a BlackBerry application?
You’re writing a BlackBerry application with several screens. How do you change from one screen to another?
If you are in the event thread (the default thread your program runs on if it’s a UI application and you haven’t started any other threads), then opening up another screen can be done by calling the pushScreen() method of the UiApplication class.
Since, in a typical case, your application derives from UiApplication, you would take a reference to your application object and call pushScreen() on it with the parameter of your new screen:
myApp.pushScreen(new MyNewScreen());
If you’re running in a worker thread, or in any context where you either don’t have access to a UiApplication or pushing a screen would not be allowed (you’re only allowed to work with UI components on the original UI thread), then pushing a screen onto the screen stack is a bit different — you need to switch to the UI thread, and then push the new screen onto the screen stack:
Application.getApplication().invokeLater( new Runnable() { public void run() { Ui.getUiEngine().pushScreen(new MyNewScreen()); } } );
At Antair, we have a simple ScreenChanger class that’s part of a larger internal library that we use for all of our projects. Here’s a stripped-down version of the ScreenChanger class for you to use.
// ----------------------------------------------------------------------------- // // Antair Library for BlackBerry Devices // ScreenChanger.java // Copyright (c) 2005 - 2011, Antair Corporation. All Rights Reserved. // // ----------------------------------------------------------------------------- package com.antair.blackberrylib.ui; import net.rim.device.api.system.Application; import net.rim.device.api.ui.Screen; import net.rim.device.api.ui.Ui; interface ScreenChangerListener { void onScreenChangeComplete(Screen openedScreen, Screen closedScreen); } final class ScreenChanger { static void change ( Screen screenToOpen, ScreenChangerListener listener ) { ScreenChanger.change(screenToOpen, null, listener); } static void change ( Screen screenToOpen, Screen screenToClose, ScreenChangerListener listener ) { Application.getApplication().invokeLater( new EventThreadScreenChanger(screenToOpen, screenToClose, listener)); } static void close ( Screen screenToClose, ScreenChangerListener listener ) { Application.getApplication().invokeLater( new EventThreadScreenChanger(null, screenToClose, listener)); } } final class EventThreadScreenChanger extends Thread { Screen _screenToOpen; Screen _screenToClose; ScreenChangerListener _listener; EventThreadScreenChanger ( Screen screenToOpen, Screen screenToClose, ScreenChangerListener listener ) { _screenToOpen = screenToOpen; _screenToClose = screenToClose; _listener = listener; } public void run() { if ( _screenToOpen != null ) { try { Ui.getUiEngine().pushScreen(_screenToOpen); } catch ( Exception e ) { // Your error handler } } if ( _screenToClose != null ) { try { Ui.getUiEngine().popScreen(_screenToClose); } catch ( Exception e ) { // Your error handler } } if ( _listener != null ) { _listener.onScreenChangeComplete(_screenToOpen, _screenToClose); } } }
Your marketing engine.
People call it a “marketing engine”, thinking that the company has control of the throttle, when really, it’s the customers, and the company is just along for the ride.
The best you can do is build something useful and stable, point it in the right direction, and hope for the ride to last you a while.


