o, you've decided to try building a mobile application. You're looking for a lot of control over the user experience and you'd also like access to various device features: sound, camera, local storage, and so onfeatures to which you normally would not have access in a web-based application.
The first issue you face is deciding upon a platform. While there are several major platforms, the biggest by far is J2ME. Because of it's market share, you choose this platform.
Sounds too good to be true? This article will walk you through the development of a simple mobile RSS feed, built using the Breeze platform. Click here to download the sample code and follow along. See for yourself how easy it is!
Your Mobile RSS Feed: The Foundation
After you've installed the Java developer kit for wireless, get started by downloading Breeze at www.cascadamobile.com. It's pretty straightforward. You can use a standalone simulator, or an Eclipse plug-in. Breeze ships with the source code for a sample application which is a nice tutorial, and everything you need, in terms of documentation, can be found here.
With the Eclipse plug-in installed, create a new Breeze project and the basic app template is set up for you, as shown in Figure 1.
Next, use HTML to create your basic layout. Now, you could do this in any editor, and even just preview it in a desktop browser, but you might as well make sure it looks good on a phone right from the start. So, grab a logo, and put some HTML in to place it on the screen, and then set up a spot for your text to appear. To add some nice CSS to the application, you can also go ahead and set up some DIV and class information.
Figure 1. A Basic App Template: Breeze sets up the basic application template automatically.
Figure 2. Appplication Home Page: After Eclipse rebuilds, you should see something like this.
In this example, your project folder is called res and it will contain your logos and CSS files. The code in Listing 1 shows the app's placeholder text where the data will appear. Use the code in Listing 2 add a little style and color with some CSS.
After Eclipse rebuilds things, your application should look like Figure 2.