Archive for May, 2007

Asynchronous Processing in Java ME: The Push Registry

Monday, May 14th, 2007

When writing mobile applications, you may encounter situations where you need to execute logic independently of user interaction. For example, your application may need to do something in response to an outside event, such as an e-mail message being received. You could put a loop in your application that periodically checks to see if the conditions for performing the task have been met. However, even if it were supported by the device, this approach could consume valuable resources. A better solution is to use the push registry API, which was added in MIDP 2.0. In this article we will take a look at the features and limitations of the push registry.

(more…)

Working with the TiledLayer Class

Sunday, May 6th, 2007

A common technique used in video games is to have a large scrolling background formed by a grid of smaller, reusable images. In MIDP 1.0, such a feature would need to be implemented from scratch or with a third-party library. However, MIDP 2.0 provides the convenient TiledLayer class to address this specific need. In this article we will look at a simple example of how to use the TiledLayer class in a Java ME application.

(more…)