Chapter 8. Mobile Development

In this chapter, we will cover:

  • Creating CLDC/MIDP Applications
  • Creating a CDC Application
  • Using Visual Mobile Designer
  • Beautifying your Mobile Application

Introduction

The Java Micro Edition, JME or more commonly known as J2ME, was built around the idea that it could be portable and that different devices, with different hardware configurations, could all make use of it.

For more information, please visit:

http://download.oracle.com/javame/

JME is divided in configurations and profiles. Configurations require devices to have a specific processing power, defined amount of available memory, certain kinds of network available, and so on. A profile complements the configurations giving a set of APIs or features that will be enabled on a particular device. Different profiles are actually the responsibility of the device manufacturers while configurations are defined in the JME.

In short, a profile complements a configuration. Profiles are more specific than configurations. Profiles specify which APIs and functionality will be available.

There are two different configurations that we will explore and build apps for in this chapter:

  • Connected Device Configuration (CDC): This is where a full JVM is supported. This configuration covers devices with higher capacity and processing power. For more information visit: http://java.sun.com/products/cdc/.
  • Connected Limited Device Configuration (CLDC): As the name suggests, this configuration is for lower-capacity devices. This covers mobile phones, PDAs, and other devices that have more limited memory. Instead of having a full JVM, a CLDC device has a KVM, which is a smaller, mobile-optimized subset of the JVM. For more information visit: http://java.sun.com/products/cldc/.

Reasons to develop with JME are as follows:

  • Virtually any modern mobile phone supports MIDP/CLDC
  • There are more than two billion devices out there to be developed for
  • A huge market just waiting for the next killer app
  • The great free IDE, NetBeans, that gives developers a very easy and powerful mobile development suite with code analyzer, top notch debug tools, and various components
  • Big names in the mobile industry like Nokia, Sony Ericsson, and Samsung all support JME

Some of the big companies go even further in their involvement with JME by providing their own development toolkit for better integration and development of applications for specific phones.

And to add a cherry to the cake, entire companies are based around JME building games and other applications.

As you will notice, we are using Microsoft Windows as our operating system for this chapter. The only reason is because Sun/Oracle did not provide, at the time of writing, a working Sun Wireless Toolkit 3 for Linux.

And since we want to provide the full advantage of the development environment, we have opted for going with the Windows version.

Now let's dig in.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.83.28