Technical Manual Version 1.1 Motorola C370, C450, and C550 Series of Handsets J2ME™ Developer Guide
2 J2ME Introduction The C370, C450, and C550 series of handsets includes the Java™ 2 Platform, Micro Edition, also known as the J2ME platform. The J2
2 J2ME Introduction 11 Mobile Information DeviceNative System SoftwareCLDCMIDPOEMClassesMIDP-CompliantAppsOEMAppsNativeAppsMobile Information Device
Resource Description Display Resolution 96 x 64 Color Depth 12 bit color (4096 colors) Networking Max HTTP, UDP and TCP Socket connections* 4
3 Developing and Packaging J2ME Applications 13 3 Developing and Packaging J2ME Applications Guide to Development in J2ME Introduction to Developme
For beginning development, key points to remember are memory size, processing power, screen capabilities and wireless network characteristics. These
4 Downloading Applications 15 4 Downloading Applications OTA Procedure There is no need of additional software tools, or cables, to downloaded MIDle
• No more than ~500 files are used by installed MIDlet suites. • JAR size listed in JAD matches actual JAR size. • MIDlet suite name and MIDlet ve
4 Downloading Applications 17 Program space is used to store class files. Data space is used to store the JAR files before installation and resource
Launching Web Session for HTTP Download The Web Sessions implementation will be modified to allow the user to download Java content using an HTTP ser
4 Downloading Applications 19 application being downloaded with the version on the series of handsets. One of the following instances will occur: •
Table of Contents TABLE OF CONTENTS...
vendor="Motorola" version="1.0" date="20010101" adf="DESC.jad" > <file name="Digital Clock" h
4 Downloading Applications 21 Example: Taichi handset.New GamesThis is a directory full of games • <a> The text between the open and close of
5 Application Management MIDlet Lifecycle A MIDlet’s lifecycle begins once its MIDlet Suite is downloaded to the device. From that point, the Applica
5 Application Management 23 • MIDlet Suite Version • The number of MIDlets in the MIDlet Suite • The Data Space (MIDlet suite resources). • Prog
Note: This image reflects a 176 x 220 display for document readability purposes only. The C370, C450, and C550 maintain a 96 x 64 display. Additiona
5 Application Management 25 MIDlet Suite Updating When a MIDlet Suite is de-installed, all of its resources are removed including any resources that
initializing state variables and preparing to be run in its constructor or startApp() methods, it may appear to be stalled to users. The flow below d
5 Application Management 27 pauseApp() AMS, MIDlet The pauseApp() method is called from either AMS or from within the MIDlet. The pauseApp() should
common error is to implement startApp( ) to execute instructions that are only intended to be executed once during MIDlet execution. The correct impl
5 Application Management 29 MIDlet Control of MIDlet State Transitions MIDlets have a lot of flexibility to control their own state. A MIDlet can ca
Table of Contents 3 HTTP...
Note: This image reflects a 176 x 220 display for document readability purposes only. The C370, C450, and C550 maintain a 96 x 64 display.
6 Network API 31 6 Network API Network Connections The J2ME platform on the Motorola C370, C450, and C550 series of handsets provides a variety of n
Class Descriptions Connection<<Interface>>DatagramConnection<<Interface>>InputConnection<<Interface>>OutputConnec
6 Network API 33 - boolean timeout – An optional third parameter, protocol may throw an IOException when it detects a time-out condition. The time
TCP Sockets The low-level socket used to implement the higher-level HTTP protocol is exposed to applications via the Generic Connection Framework. T
6 Network API 35 Notes It is important to take into consideration the blocking nature of many javax.microedition.io and java.io object methods with
7 LCDUI LCDUI API The following table lists the specific interfaces supported by Motorola implementation: Interface Description Choice Choice defin
7 LCDUI 37 information of an action. CustomItem A CustemItem is customizable by sub classing to introduce new visual and interactive elements into
8 Gaming API and Sound Functional Description The Gaming API provides gaming related functionality to J2ME MIDlet writers. This functionality include
8 Gaming API and Sound 39 BackgroundMusic Class The BackgroundMusic class encapsulates the data for a game's background music. A game may creat
OVERVIEW...
GameScreen Class The GameScreen class provides the basis for a game user interface. In addition to the features inherited from MIDP's Canvas (co
8 Gaming API and Sound 41 • public static final int VOLUME_MIN - The minimum volume for playing sound effects. This constant has a value of 0. Game
information, disabling key events can improve performance. Note that this setting is unique to each GameScreen instance; other GameScreens, when sho
8 Gaming API and Sound 43 • public void playBackgroundMusic (BackgroundMusic bgm, boolean loop) - Plays the specified BackgroundMusic object from t
ImageUtil Class ImageUtil provides static methods useful to the manipulation of Image objects. Specifically, it provides methods for setting and gett
8 Gaming API and Sound 45 24-bit color format (0xRRGGBB). The method parameters are the following: dest - The mutable destination Image whose pixels
} } PalleteImage Class PaletteImage provides methods for manipulating the color palette data of an image. PaletteImages can only be created wit
8 Gaming API and Sound 47 • public void setTransparentIndex(int index) throws IndexOutOfBoundsException – Sets the current transparent index. Pixe
raceCar.setPaletteEntry(0, 0x0000FF); Image blueRaceCar = raceCar.getImage(); // Set the car color to green and retrieve the Image raceCar.setPalett
8 Gaming API and Sound 49 calling setAnimatedTileImage(-2, 2);, cells (0,0) and (0,1) will then be drawn with the image of static Tile 2. Using Spri
1 Introduction 5 1 Introduction Purpose This document describes the application program interfaces used to develop Motorola compliant Java™ 2 Platfo
multiple of the tile width. The height of the source image must be an integer multiple of the tile height. The tiles in the source image will have in
8 Gaming API and Sound 51 PlayField are all empty (tile 0 - a reserved tile and represents an empty square). A tile set can later be added using set
source and destination cells overlap, the method shall behave as if the source cells are first copied to a separate array, the source cells are clear
8 Gaming API and Sound 53 collidesWithAnyTile(Sprite) and collidesWithTiles(int, int, int, int, Sprite, boolean) complement each other. Sprite s doe
• public void setViewWindow(int x, int y, int width, int height) – Sets the portion of the PlayField that will be drawn when draw(Graphics, int, int
8 Gaming API and Sound 55 SoundEffect Class The SoundEffect class encapsulates the data for a game sound effect. A game may create several SoundEffe
Animation Frames An animated sprite is created from an image divided into sections as described in the constructor Sprite(Image, int, int). The indiv
8 Gaming API and Sound 57 The creation of the raw frames follows these standards: − Frames must be equally sized, all being of the frame width (fWi
• public void setDepth(int d) – Set Sprite's depth order. The depth order is relative to other Sprites when multiple Sprites are contained in a
8 Gaming API and Sound 59 • public void setVisible(boolean visible) – Set visibility status. If setVisible(false) is called, the Sprite will not be
In no event shall Motorola be liable, whether in contract or tort (including negligence), for any damages resulting form use of a product or service
− Any custom frame sequence will be deleted and the frame sequence will revert to the default frame sequence for the new frame set (all frames in th
8 Gaming API and Sound 61 FileFormatNotSupportedException Constructors The FileFormatNotSupportedException class defines the following constructors:
9 Vibe and Backlight Vibe and Backlight API The Vibe and Backlight API allows J2ME applications access to vibrator, backlight, and keypad control. T
10 SMS MO 63 10 SMS MO Overview Motorola has implemented certain features that are defined in the Wireless Messaging API (WMA) 1.0. The complete spe
Sending a Message The SMS MO API will provide an avenue to send a message to the appropriate SMS address. Permissions Prior to the series of handse
11 JAD Attributes 65 11 JAD Attributes JAD Attributes Motorola has implemented the following support for MIDP 1.0 Java Application Descriptor attrib
Mandatory attributes for manifest files MIDlet-Name MIDlet-Version MIDlet-Vendor MIDlet-<n> MIDlet-MicroEdition-Profile MIDlet-Install-Notify M
12 Record Management System 67 12 Record Management System Overview The most common mechanism for persistently storing data on a MIDP device is thro
//process the IOException } Tips It is much faster to read and write in big chunks than it is to do so in small chunks. Whenever you close a
13 Phonebook Access 69 13 Phonebook Access Phonebook Access API Using the Phonebook Access API, an application will be able to locate and update co
1 Introduction 7 Revision History Version Date Name Reason 0.1 Novemeber 24, 2003 Motocoder Initial Draft 1.0 December 15, 2003 Motocoder Basel
Phonebook Access API Permissions Prior to a MIDlet accessing the Phonebook API for all Phonebook operations, the implementation will check the Phoneb
13 Phonebook Access 71 Sample of code for calling of ‘findRecordByName(char firstChar, int sortOrder)’ method: index = PhoneBookRecord.findRecordB
int maxNameLengthPhone = PhoneBookRecord.getMaxNameLength(PhoneBookRecord.PHONE_MEMORY); int maxNameLengthSim = PhoneBookRecord.getMaxNameLength(Ph
13 Phonebook Access 73 Sample of code for calling of ‘resetPrimary(int index, int sortOrder)’ method: int index = 1; PhoneBookRecord.resetPrimary(i
int mlspeedNo = 3, mbspeedNo = 4; PhoneBookRecord.deleteMailingListMember(mlspeedNo, mbspeedNo); Sample of code for calling of ‘getMailingListMember
13 Phonebook Access 75 int maxCategoryNameLength = PhoneBookRecord.getMaxCategoryNameLength(); Sample of code for calling of ‘getCurrentCategoryVi
Sample of code for calling of ‘getUsedRecords()’ method: int usedRecs = RecentCallDialed.getUsedRecords(); Sample of code for calling of ‘getNumber
13 Phonebook Access 77 Sample of code for calling of ‘getRecord(int index)’ method: int index = 1; receivedRecord.getRecord(1); Sample of code fo
14 iTAP Intelligent Keypad Text Entry API When users are using features such as SMS (short message service), or “Text Messaging”, they can opt for a
Appendix A: Key Mapping 79 Appendix A: Key Mapping Key Mapping for the C370, C450, and C550 The table below identifies key names and corresponding
MIDP Mobile Information Device Profile OEM Original Equipment Manufacturer OTA Over The Air RMS Record Management System RTOS Real Time Operatin
CENTER SELECT SELECT END Handled according to VSCL specification: Pause/End/Resume/Background menu invoked.
Appendix B: Memory Management Calculation 81 Appendix B: Memory Management Calculation Available Memory The available memory on the Motorola C370,
Appendix C: FAQ Online FAQ The MOTOCODER developer program is online and able to provide access to Frequently Asked Questions around enabling techn
Appendix D: Spec Sheets 83 Appendix D: Spec Sheets C370, C450, and C550 Spec Sheets Listed below are the spec sheets for the Motorola C370, C450,
Motorola C370/C450Developer Reference Sheet Band Frequency GSM 900/1800 GPRS GSM 850/1900 GPRS Region Global Technology WAP 2.0, J2ME, SMS, EMS
Appendix D: Spec Sheets 85 Band Frequency GSM 900/1800 GPRS Region EMEA/Asia Technology WAP 2.0, J2ME, SMS, EMS, MMS, AOL/OICQ IM Connectivity
MOTOROLA and the Stylized M Logo are registered in the U.S. Patent & Trademark Office. All other product or service name
1 Introduction 9 Chapter 11 – JAD Attributes: this chapter describes what attributes are supported. Chapter 12 – Record Management System: this chap
Comments to this Manuals