Sun Microsystems Computer Accessories manual P E N D I X C

Page 73

A P P E N D I X C

Connecting to the Wireless Toolkit’s WMA Emulation Environment

The J2ME Wireless Toolkit supports the Wireless Messaging API (WMA), which enables you to send and receive SMS or CBS messages. The Wireless Toolkit’s support for messaging includes automatically assigning phone numbers to emulators and routing messages between them. You can develop and test WMA applications entirely within the WTK environment. For information on the WMA, see http://java.sun.com/products/wma.

However, if you want to send or receive WMA messages to programs outside of the Wireless Toolkit environment, you can use the extension API that is provided by the Wireless Toolkit. By using the extension API, you can:

Send or receive SMS or CBS messages from the emulation environment in the Wireless Toolkit to or from J2SE programs outside the Wireless Toolkit environment. This enables you to communicate through WMA messages between MIDlets within the Wireless Toolkit emulators and an external J2SE program. This external program can provide whatever functionality you program it to have, for example, imitating a service that responds to WMA messages.

Create a component that acts as a messaging gateway. You can write your own J2SE program that registers itself with the Wireless Toolkit as a default gateway. The Wireless Toolkit will forward all messages from within the Wireless Toolkit environment that do not have a recognized destination phone number to the default gateway. This enables you to extend the Wireless Toolkit WMA environment to other message routing environments, for example, an actual Short Message Service Center (SMSC).

For information on the extension API, see the {j2mewtk.dir}\docs\wtk\wmaBridge directory.

59

Image 73
Contents Basic Customization Guide Please Contents Examining Device Property Files Default Emulator Device Property Files Vi Wireless Toolkit Basic Customization Guide December Figures Viii Wireless Toolkit Basic Customization Guide December Tables Wireless Toolkit Basic Customization Guide December How This Book Is Organized Who Should Use This BookUsing Operating System Commands Shell Prompts Typographic ConventionsRelated Documentation Sun Welcomes Your Comments Accessing Sun Documentation OnlineHow to Customize the Wireless Toolkit Customizing the Wireless ToolkitCustomization Steps Device Property Files and the Default EmulatorCustomizing the Wireless Toolkit Wireless Toolkit Basic Customization Guide December Make a Copy of an Existing Main Device Property File Creating Device Property FilesObtain and Enter Image Files Screen Location Obtain and Enter the Screen PropertiesDisplay Area Total Screen SizeSpecifying Screen Properties Display Area in Full Screen ModeBy measuring the image file, obtain the button properties Obtain and Enter the Button PropertiesHeight Width Obtain and Enter Soft Button Label Areas Soft button label display is defined by a line of the form Defining the Icon Location and States Obtain and Enter Icon PropertiesEnter the following measured values for the icons properties Run the Emulator for the New Device Enter Color PropertiesScreen Background RGB Color Examining Device Property Files Device Property Files Fonts Main Device Property FileFonts Used by the Midp APIs System Fonts Default FontBitmap Fonts Ascii character Distance to character Device Image Font UnderliningImage with Buttons Pressed Image without Buttons PressedImage with Buttons Highlighted and Backlight On ScalingScreen Properties Screen Location Total Screen Size Display Area in Full Screen ModeDisplay Area Screen Background Color Screen Pixel RatioTouch Screen Screen Border ColorScreen Buffering Keyboard Handler Device ButtonsDefining a Device Button Button.LEFT = 13, 197, 20 Assigning a PC Keyboard Key to a Button Specifying the Characters Generated by a Button Press Assigning a Game Action to a ButtonAbstract Command Types in Order of Precedence Assigning Abstract Commands to ButtonsEmulating Abstract Command Button Assignments Precedence of Assigning Commands to a Button Secondary Button Assignments Abstract Command Menu Defining the Icon Location and States Displayed IconsSoft Button Labels on the Emulated Device Display Soft Button Label DisplaySound Alerts ColorAlert Type Values Device Software CapabilitiesCharacter Encodings LocalesTransparent Images EnableAlphaChannel falseWireless Toolkit Basic Customization Guide December Property Files Default Emulator Device Property FilesDefaultGrayPhone.properties Appendix a Default Emulator Device Property Files Wireless Toolkit Basic Customization Guide December Appendix a Default Emulator Device Property Files Wireless Toolkit Basic Customization Guide December # alert.alerttype.sound soundfile Wireless Toolkit Basic Customization Guide December Icon Image Files Device Image FilesIcon Image Files Adding a ByteCode Obfuscator Support for ByteCode ObfuscatorsExample Appendix B Support for ByteCode Obfuscators Wireless Toolkit Basic Customization Guide December P E N D I X C Wireless Toolkit Basic Customization Guide December Index Keyboard.handler property Device property files, 1 WMA messages, customizing Wireless Toolkit Basic Customization Guide December