Motorola MOTORAZR maxx V6 Developer's Manual

Java me developer guide
Hide thumbs Also See for MOTORAZR maxx V6:
Table of Contents

Advertisement

MOTORAZR maxx V6
Java ME Developer Guide
Version 00.02
DRAFT - Subject to Change

Advertisement

Table of Contents
loading

Summary of Contents for Motorola MOTORAZR maxx V6

  • Page 1 MOTORAZR maxx V6 Java ME Developer Guide Version 00.02 DRAFT - Subject to Change...
  • Page 2: Table Of Contents

    TABLE OF CONTENTS ... 2 INDEX OF TABLES ... 8 INDEX OF FIGURES ... 10 INDEX OF CODE SAMPLES ... 11 1 Introduction ... 12 1.1 P ... 12 URPOSE 1.2 A ... 12 UDIENCE 1.3 D ... 12 ISCLAIMER 1.4 R ...
  • Page 3 7.1 O ... 40 VERVIEW 7.2 JSR-82 B API ... 40 LUETOOTH 7.2.1 S YSTEM EQUIREMENTS 7.2.2 B LUETOOTH ONTROL 7.2.3 D EVICE ROPERTY ABLE 7.2.4 S ERVICE EGISTRATION 7.2.4.1 C ONNECTABLE 7.2.4.2 N ONNECTABLE 7.2.5 D EVICE ANAGEMENT 7.2.5.1 G ENERIC CCESS 7.2.5.2 S...
  • Page 4 9.2 SMS C LIENT ODE AND 9.3 SMS P ... 65 UMBERS 9.4 SMS S TORING AND ELETING 9.5 SMS M ... 66 ESSAGE YPES 9.6 SMS M ESSAGE TRUCTURE 9.7 SMS N ... 67 OTIFICATION 10 JSR-135 - Mobile Media API ... 73 10.1 JSR-135 ...
  • Page 5 13.2 M 3D API...100 OBILE 13.3 M 3D API F OBILE ORMAT 13.4 M 3D G - M3G API ...101 OBILE RAPHICS 13.4.1 T M3G A YPICAL PPLICATION 13.4.2 S ...102 IMPLE LETS 13.4.3 I NITIALIZING THE WORLD 13.4.4 U SING THE RAPHICS 13.4.5 I...
  • Page 6: Download Midlet Through Pc

    16.2 U PDATE CERTIFICATES ON THE 16.3 P ROCEDURE FOR VIEWING 16.4 R OAMING HANGE OF 17 Prevent Downloading of Large Java MIDlets... 130 17.1 O ...130 VERVIEW 17.2 N ...131 OTIFICATION 17.3 B ACKWARD OMPATIBILITY 18 Download Midlet through PC ... 132 18.1 E STABLISHING ONNECTION...
  • Page 7 ONNECTOR 28.5 C ...185 ECURITY 28.6 P AMING ONVENTION 28.7 M ...187 ETHOD UMMARY 29 Motorola Get URL from Flex API ... 188 29.1 O ...188 VERVIEW 29.2 F LEXIBLE FOR DOWNLOADING FUNCTIONALITY 29.3 S ...189 ECURITY OLICY 30 Motorola Secondary Display API ... 190 30.1 P...
  • Page 8: Index Of Tables

    Table 6 Application management feature ... 31 Table 7 Permissions and Groups ... 35 Table 8 Groups and permissions for ... 37 Table 9 Motorola Bluetooth device properties ... 41 Table 10 Security Policy ... 45 Table 11 Interoperability Requirements ... 48 Table 12 MIDP 2.0 Feature/Class ...
  • Page 9 Table 31 MIDlet attributes, descriptions, and its location in the JAD and/or JAR manifest...172 Table 32 LCDUI API specific interfaces supported by Motorola implementation...175 Table 33 LCDUI API specific classes supported by Motorola implementation ...175 Table 34 Feature/class support for MIDP ...176 Table 35 iTAP feature/class ...181 Table 36 Interface Commconncetion optional parameters...184...
  • Page 10: Index Of Figures

    Index of Figures Figure 1 Java™ ME Architecture ... 20 Figure 2 JavaSystem Menu ... 24 Figure 3 MIDway "Java Tool" menu ... 27 Figure 4 Pressing of End Key ... 47 Figure 5 Examples Screens ... 47 Figure 6 M3G Application Proccess ...101 Figure 7 M3G Application Methods ...102 Figure 8 Typical MIDlet Structure...103 Figure 9 Delete a Trusted Third Party Domain Root Certificate...127...
  • Page 11: Index Of Code Samples

    Index of Code Samples Code Sample 1 JSR-120 WMA ... 68 Code Sample 2 JSR-135 MMA... 73 Code Sample 3 Request for Access Algorithm ... 97 Code Sample 4 Initializing the world ...105 Code Sample 5 Using the Graphics3D object ...105 Code Sample 6 Finding objects by ID.
  • Page 12: Introduction

    Java ME applications for the MOTORAZR maxx V6 handset. 1.3 Disclaimer Motorola reserves the right to make changes without notice to any products or ser- vices described herein. "Typical" parameters, which may be provided in Motorola Data sheets and/or specifications can and do vary in different applications and actual performance may vary.
  • Page 13 In no event shall Motorola be liable, whether in contract or tort (including negli- gence), for any damages resulting from use of a product or service described herein,...
  • Page 14: References

    Java ME Developer Guide Chapter 1 - Introduction Motorola recommends that if you are not the author or creator of the graphics, video, or sound, you obtain sufficient license rights, including the rights under all patents, trademarks, trade names, copyrights, and other third party proprietary rights.
  • Page 15 Java Virtual Machine K Virtual Machine (Java™ ME runtime environment) L2CAP Logical Link Control and Adaptation Protocol LCDUI Limited Connected Device User Interface Motorola Internet Browser MIDP Mobile Information Device Profile Multimedia API MSISDN Mobile Station Integrated Services Digital Network...
  • Page 16: Document Overview

    Java ME Developer Guide Chapter 1 - Introduction Public-Key Infrastructure Portable Network Graphics (image extension '.png') Request for Comments RFCOMM Radio Frequency Communication-Bluetooth protocol that provides emulation of RS-232 (serial) connection Record Management System RUIM Removable User Identity Module Segmentation & Reassembly SIM Application Toolkit SATSA Security and Trust Services API...
  • Page 17 Java ME Developer Guide Chapter 1 - Introduction This developer's guide is organized into the following chapters and appendixes: Chapter 1 - Introduction: This chapter has general information about this document, including purpose, scope, references, and definitions. Chapter 2 - Java ME Introduction: This chapter describes the Java ME platform and the available resources on this Handset.
  • Page 18 Chapter 28 - CommConnection Interface: This chapter describes the CommConnection API. Chapter 29 - Motorola Get URL from Flex API: This chapter describes the way to access URL stored in FLEX by a java application. Chapter 30 - Motorola Secondary Display API: This chapter details the capability for J2ME applications to render content to Motorola devices that feature a secondary display.
  • Page 19: Java Me Introduction

    By imple- menting the Java ME platform on devices like the MOTORAZR maxx V6 handset, ser- vice providers, as well as customers, can easily add and remove applications allowing for quick and easy personalization of each device.
  • Page 20: The Motorola Java™ Me Platform

    Java™ Platform. Figure 1 Java™ ME Architecture The Configuration Layer used in the MOTORAZR maxx V6 handset is the Connected Limited Device Configuration 1.1 (CLDC 1.1) and the Profile Layer used is the Mobile Information Device Profile 2.0 (MIDP 2.0).
  • Page 21 Java ME Developer Guide Chapter 2 - Java ME Introduction maxx V6 handset: Application delivery and billing Application lifecycle Application signing model and privileged security model End-to-end transactional security (HTTPS) MIDlet push registration (server push model) Networking Persistent storage Sounds Timers User Interface File Image Support (.PNG, .JPEG, .GIF, .BMP)
  • Page 22: Developing And Packaging Java Me Applications

    MIDlets for Java ME handsets. There is a wealth of material on this subject on the following websites maintained by Motorola, Sun Microsystems and others. Please refer to the following URLs for more information: http://developer.motorola.com http://www.java.sun.com/javame...
  • Page 23: Recognizing The Phone Core Specifications

    These IDEs come from a range of sources such as Sun, IBM and Borland to name a few. In addition to the IDEs and Sun SDK for development, Motorola offers access to our own SDK which contains Motorola device emulators. From here, a MIDlet can be built and then deployed onto an emulated target handset.
  • Page 24: Figure 2 Javasystem Menu

    Java ME Developer Guide Chapter 3 - Developing and Packaging Java ME Applications handset, review the "Java System" details through the menu on the Motorola handset (located under "Java Settings") as shown in Figure 2 . Figure 2 JavaSystem Menu NOTE: This screenshot is only an example.
  • Page 25: Downloading Applications

    4.1 Methods of Downloading There are two options open to the developer for deploying the MIDlet to a physical Motorola device. These are OTA (over-the-air) downloading or direct cable (Serial) downloading through a PC to the target device. Method 1 - OTA To use the OTA method, the developer will have a connection through a wireless net- work to a content server.
  • Page 26 A basic Over the Air Server Configuration document can be found in our Technical Articles section at http://developer.motorola.com/. This includes details of config- uring the server and also example WAP pages. In these handsets, the user is given an option of deleting any MIDlets that are on the phone if an OTA download cannot be achieved due to lack of space.
  • Page 27 If it is not, then contact MOTODEV support for advice on how to receive an enabled handset. Motorola provides a User Guide with the MIDway tool (as listed above) as well as a document outlining the tool for actual version on the MOTODEV website entitled "In- stalling Java ME MIDlet using MIDway Tool".
  • Page 28: Error Logs

    Java ME Developer Guide Chapter 4 - Downloading Applications Figure 3 MIDway "Java Tool" menu The USER-AGENT String Table 4 describes USER_AGENT strings associated with Motorola devices: Motorola USER_AGENT STRING Device MOTORAZR User-Agent: MOT-V6/xx.xx.xxR Opera/8 Profile/MIDP-2.0 Configura- maxx V6 tion/CLDC-1.1...
  • Page 29: Table 5 Error Logs

    Java ME Developer Guide Chapter 4 - Downloading Applications bols) MIDlet-JAR_Size Download OTA JAR The received JAR size does not Failed Download match the size indicated Cancelled: OTA JAR User cancelled download <Icon> Download <Filename> Download OTA JAR Browser lost connection with serv- Failed Download Certification path cannot be valid-...
  • Page 30: Application Management

    5.1 Downloading a JAR file without a In Motorola's MIDP 2.0 implementation, a JAR file can be downloaded without a JAD. In this case, the user clicks on a link for a JAR file, the file is downloaded, and con- firmation will be obtained before the installation begins.
  • Page 31: Installation And Deletion Status Reports

    Java ME Developer Guide Chapter 5 - Application Management The data is saved if the new MIDlet-version is the same or newer, and if the new MIDlet-data-space requirements are the same or more than the current MIDlet. The data is not saved if the new MIDlet-data-space requirement is smaller than the current MIDlet requirement.
  • Page 32: Table 6 Application Management Feature

    Java ME Developer Guide Chapter 5 - Application Management AMS will check the JAD for security indicated every time a download is initiated Application descriptor or MIDlet fails the security check, the AMS will prevent the in- stallation of that application and notify the user that the MIDlet could not be in- stalled Application descriptor and MIDlet pass the security check , the AMS will install the MIDlet and grant it the permissions specified in the JAD...
  • Page 33: Pim And Fileconnection Apis

    Java ME Developer Guide Chapter 6 - JSR-75 - PIM and Fileconnection APIs JSR-75 - PIM and Fileconnection APIs This chapter defines the JSR-75 APIs implementation requirements that shall replace the earlier implemented Phonebook and Fileconnection APIs requirements, except for the Recent Calls API that shall still be supported by RecentCallRecord, Recent- CallDialed and RecentCallReceived classes.
  • Page 34 Java ME Developer Guide Chapter 6 - JSR-75 - PIM and Fileconnection APIs to javax.microedition.pim: javax.microedition.pim.PIM; javax.microedition.pim.RepeatRule; javax.microedition.pim.PIMException; javax.microedition.pim.FieldEmptyException; javax.microedition.pim.FieldFullException; javax.microedition.pim.UnsupportedFieldException; javax.microedition.pim.PIMItem; javax.microedition.pim.Contact; javax.microedition.pim.Event; javax.microedition.pim.PIMList; javax.microedition.pim.ContactList; javax.microedition.pim.EventList. The implementation should include support of the following packages, classes, and interfaces with appropriate methods and fields of FileConnection API described in JSR-75, related to javax.microedition.io.file: javax.microedition.io.file.ConnectionClosedException;...
  • Page 35: Contact List

    Java ME Developer Guide Chapter 6 - JSR-75 - PIM and Fileconnection APIs Function Trusted Third Group Party User Data Always Ask, Ask Read Capab- Once Per App, Never ility Ask, No Access User Data Always Ask, Ask Write Capab- Once Per App, Never ility Ask, No Access...
  • Page 36: Event List

    6.2 Fileconnection API The primary goal of the FileConnection API is to provide access to file systems on devices and/or mounted removable memory cards supported by Motorola devices. 6.2.1 Requirements Fileconnection API requirements will be replaced with the requirements below.
  • Page 37: Table 8 Groups And Permissions For

    Java ME Developer Guide Chapter 6 - JSR-75 - PIM and Fileconnection APIs The implementation should provide a security model for accessing the FileConnection APIs as defined in JSR-75. Fileconnection API should be accessible to manufacturer and operator domain MIDlets subject to security restrictions. Connection API should prohibit the modification or removing the files and directories marked with the system attribute.
  • Page 38 Java ME Developer Guide Chapter 6 - JSR-75 - PIM and Fileconnection APIs The following javax.microedition.io.Connector methods should check for the "read permission": open("file:///..."); open("file:///...", Connector.READ); open("file:///...", Connector.READ_WRITE); openDataInputStream(); openInputStream() The following javax.microedition.io.file.FileConnection methods should check for the "read permission": setFileConnection, when instance opened with READ;...
  • Page 39 Java ME Developer Guide Chapter 6 - JSR-75 - PIM and Fileconnection APIs File Location would represent either: "Phone" (when the file is stored on the phone). Ex: open("file:///phone/..."); "Card" (when the file is stored on a MMC, SD, T-Flash or other card-related media).
  • Page 40: Bluetooth Api

    Java ME Developer Guide Chapter 7 - JSR-82 - Bluetooth API JSR-82 - Bluetooth API 7.1 Overview JSR-82 covers the establishment of connections between devices for such applica- tions as peer-to-peer gaming and Bluetooth pen use. There are two new requirements from this API. The quired to establish general Bluetooth connections.
  • Page 41: Bluetooth Control Center

    The base security settings of the local device, including the security modes defined in the Bluetooth specification 7.2.3 Device Property Table Table 9 lists the Motorola Bluetooth device properties for current products. These device properties must be available to the MIDlet suite. Device Property bluetooth.api.version...
  • Page 42: Service Registration

    Table 9 Motorola Bluetooth device properties 7.2.4 Service Registration Service Registration is the portion of the BCC that controls the Service Discovery Database (SDDB). The SDDB is a list of available services on the local device. Ser- vices registered in the SDDB by a MIDlet will be removed when the connection noti- fier is closed or when the MIDlet terminates.
  • Page 43: Non-Connectable Mode

    Java ME Developer Guide Chapter 7 - JSR-82 - Bluetooth API In connectable mode, the Bluetooth device periodically listens for connection requests. The Bluetooth device will respond according to security settings and service availability for requested connection. Non-Connectable Mode In non-connectable mode, the Bluetooth device is neither discoverable nor connect- able.
  • Page 44: Communication

    Java ME Developer Guide Chapter 7 - JSR-82 - Bluetooth API 7.2.6 Communication Communication covers establishing connections to other devices via specific Bluetooth profiles or protocols. Bluetooth connections established using this API are based on the following three protocols: RFCOMM L2CAP OBEX Additionally, other profiles can be built upon these three basic protocols, but the pro-...
  • Page 45: Security Policy

    Java ME Developer Guide Chapter 7 - JSR-82 - Bluetooth API Rules: The following OBEX operations MUST be supported by the API: CONNECT DISCONNECT SETPATH ABORT CREATE-EMPTY PUT-DELETE OBEX MUST support Bluetooth OBEX MAY support the following transports (where available) IrDA TCP/IP OBEX must support authentication.
  • Page 46: Incoming Call

    Java ME Developer Guide Chapter 7 - JSR-82 - Bluetooth API Incoming Call Rules: Upon receiving an incoming call: The Bluetooth connection shall remain active when the MIDlet is suspended. The Bluetooth connection shall be terminated when the user Ends the MIDlet. Incoming Message Rules: Upon receiving an incoming call:...
  • Page 47: Pressing Of End Key

    Java ME Developer Guide Chapter 7 - JSR-82 - Bluetooth API 7.2.10 Pressing of End Key Figure 4 Pressing of End Key Rules: Pressing the END key shall: Terminate any ongoing Bluetooth connection. If possible, notify any other device that the session will be disconnected.
  • Page 48: Table 11 Interoperability Requirements

    Java ME Developer Guide Chapter 7 - JSR-82 - Bluetooth API Figure 5 Examples Screens Event Screen List Discoverable Dialog "Discover- able..." <Timer Countdown> Bond Re- Dialog "Bond with quest <device>?" Invalid PIN Transient "Invalid PIN" Service Dis- Dialog "Scanning..." covery "Devices found: <#>"...
  • Page 49: Midp 2.0 Security Model

    Trusted MIDlet suites and domains Permissions Certificates For a detailed MIDP 2.0 Security process diagram, refer to the MOTODEV website (http://developer.motorola.com). Refer to Table 12 for the default security feature/class support for MIDP 2.0: Feature/Class All methods for the Certificate interface in the javax.microedition.pki package...
  • Page 50: Untrusted Midlet Suites

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model javax.microedition.pki package Will preload two self authorizing Certificates All constructors, methods, and inherited methods for the MIDletStateChangeException class in the javax.microedition.midlet package All constructors and inherited methods for the MID- letStateChangeException class in the javax.microedition.midlet package Table 12 MIDP 2.0 Feature/Class...
  • Page 51: Trusted Midlet Suites

    MIDlet suite in that particular domain. A MIDlet suite will belong to one protection domain and its defined permissible ac- tions. For implementation on the MOTORAZR maxx V6, the following protection do- mains should exist: Manufacturer - permissions will be marked as "Allowed"...
  • Page 52: Permission Types Concerning The Handset

    MIDlet suite access to the protected API or function. 8.5 User Permission Interaction Mode User permission for the MOTORAZR maxx V6 handsets is designed to allow the user the ability to either deny or grant access to the protected API or function using the...
  • Page 53: Implementation Based On Recommended Security Policy

    Recommended Security Policy The required trust model, the supported domain, and their corresponding structure will be contained in the default security policy for Motorola's implementation for MIDP 2.0. Permissions will be defined for MIDlets relating to their domain. User permission types, as well as user prompts and notifications, will also be defined.
  • Page 54: Security Policy For Protection Domains

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model Protected Function- Top Line of Prompt ality Data Network Use data network? Messaging Use messaging? App Auto-Start Launch <MIDlet names>? Connectivity Options Make a local connection? User Data Read Cap- Read phonebook data? ability User Data Write Cap-...
  • Page 55 Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model bolded setting is the default setting. The Function Group is what will be displayed to the user when access is requested and when modifying the permissions in the menu. The default setting is the setting that is effective at the time the MIDlet suite is first invoked and remains in effect until the user changes it.
  • Page 56: Table 15 Security Policy For Protection Domains

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model Ask, Never Ask, No Access User Data Ask once No Access Write Capab- ility App, Always Ask, Never Ask, No Access Multimedia Ask once No Access Recording App, Always Ask, Never Ask, No Access...
  • Page 57: Displaying Of Permissions To The User

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model javax.wireless.messaging.cbs.receiv Multimedia Recording javax.microedition.media.RecordCo ntrol. startRecord Table 16 MIDP 2.0 Specific Functions Each phone call or messaging action will present the user with the destination phone number before the user approves the action. The handset will ensure that I/O access from the Mobile Media API follows the same security requirements as the Generic Connection Framework.
  • Page 58: Signing Amid Let Suite

    Specially designed certificates for code signing can be obtained from the manufacturer, operator, or certificate authority. Only root certificates stored on the handset will be supported by the MOTORAZR maxx V6 handset. 8.12 Signer of MIDlet Suites The signer of a MIDlet suite can be the developer or an outside party that is respons- ible for distributing, supporting, or the billing of the MIDlet suite.
  • Page 59: Suites

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model MIDlet Suites Attributes defined within the manifest of the JAR are protected by the signature. At- tributes defined within the JAD are not protected or secured. Attributes that appear in the manifest (JAR file) will not be overridden by a different value in the JAD for all trusted MIDlets.
  • Page 60: Creating The Rsa Sha-1 Signature Of The Jar

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model When inserting a certificate into a JAD, the certificate path includes the signer certi- ficate and any necessary certificates while omitting the root certificate. Root certific- ates will be found on the device only. Each certificate is encoded using base 64 without line breaks, and inserted into the application descriptor as outlined below per MIDP 2.0.
  • Page 61: Verifying The Signer Certificate

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model When a MIDlet suite is downloaded, the handset will check the JAD attribute MIDlet- Jar-RSA-SHA1. If this attribute is present, the JAR will be authenticated by verifying the signer certificates and JAR signature as described. MIDlet suites with application descriptors that do not have the attributes previously stated will be installed and in- voked as untrusted.
  • Page 62: Verifying The Midlet Suite Jar

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model and validated. Table 17 Actions performed of signer certificate verification 8.19 Verifying the MIDlet Suite JAR The following are the steps taken to verify the MIDlet suite JAR: 1. Get the public key from the verified signer certificate. 2.
  • Page 63: Carrier Specific Security Model

    Java ME Developer Guide Chapter 8 - MIDP 2.0 Security Model verification fails Error. Application not installed." Parsing of security attrib- JAD rejected, JAR installation will not be allowed. The utes in JAD fails following error prompt will be shown, "Failed Invalid File."...
  • Page 64: Wireless Messaging Api

    JSR-120 - Wireless 9.1 Wireless Messaging API (WMA) Motorola has implemented certain features that are defined in the Wireless Mes- saging API (WMA) 1.0. The complete specification document is defined in JSR-120. The JSR-120 specification states that developers can be provided access to send (MO - mobile originated) and receive (MT - mobile terminated) SMS (Short Message Ser- vice) on the target device.
  • Page 65 The Wireless Messaging API is based on the Generic Connection Framework (GCF), which is defined in the CLDC specification 1.1. The use of the "Connection" frame- work, in Motorola's case is " ". can be opened in either server or client mode. A server con- nection is opened by providing a URL that specifies an identifier (port number) for an application on the local device for incoming messages.
  • Page 66 Java ME Developer Guide Chapter 9 - JSR-120 - Wireless Messaging API a port number, the originating port number is set to an implementation specific value and any possible messages received to this port number are not delivered to the Please refer to the sections A.4.0 and A.6.0 of the JSR-120.
  • Page 67 SMS messages to be received and concatenated together. Also, for sending, support for a minimum of three messages is supported. Motorola advises that developers should not send messages that will take up more than three SMS protocol messages unless the recipient's device is known to support more.
  • Page 68: Table 19 List Of Messaging Features/Classes

    Java ME Developer Guide Chapter 9 - JSR-120 - Wireless Messaging API Always ask for user authorization Ask once per application Never Ask Table 19 is a list of Messaging features/classes supported in the device. Feature/Class JSR-120 API. Specifically, APIs defined in the javax.wireless.messaging package will be imple- mented with regards to the GSM SMS Adaptor Removal of SMS messages...
  • Page 69 Java ME Developer Guide Chapter 9 - JSR-120 - Wireless Messaging API Creation of client connection, creation of binary message, setting of payload for binary message and calling of method 'numberOfSegments' for Binary message: BinaryMessage binMsg; MessageConnection connClient; int MsgLength = 140; /* Create connection for client mode */ connClient = (MessageConnection) Connector.open("sms://"...
  • Page 70 Java ME Developer Guide Chapter 9 - JSR-120 - Wireless Messaging API Creation of client connection without port number: MessageConnection messageConnection = (MessageConnection)Connector.open("sms://+18473297274"); Closing of connection: MessageConnection messageConnection.close(); Creation of SMS message: Message textMessage = messageConnection.newMessage(MessageConnection. TEXT_MESSAGE); Setting of payload text for text message: ((TextMessage)message).setPayloadText("Text Message");...
  • Page 71 Java ME Developer Guide Chapter 9 - JSR-120 - Wireless Messaging API String address = ((TextMessage)message).getAddress(); Getting of SMS service center address via calling of System.getProperty(): String addrSMSC = System.getProperty("wireless.messaging.sms.smsc"); Getting of timestamp for the message: Message message; System.out.println("Timestamp: " + message.getTimestamp().getTime()); Setting of MessageListener and receiving of notifications about incoming messages: public class JSR120Sample1 extends MIDlet implements CommandListener {...
  • Page 72 Java ME Developer Guide Chapter 9 - JSR-120 - Wireless Messaging API public void run() { try { messageConnection.setMessageListener(listener); } catch (IOException e) { result = FAIL; System.out.println("FAILED: exception while setting listener: " + e.toString()); DRAFT - Subject to Change Code Sample 1 JSR-120 WMA [72/201]...
  • Page 73 Java ME Developer Guide Chapter 10 - JSR-135 - Mobile Media API JSR-135 - Mobile Media 10.1 JSR-135 The JSR-135 Mobile Media APIs feature sets are defined for different types of media. The media defined are as follows: Tone Sequence Sampled Audio MIDI Interactive MIDI...
  • Page 74 Java ME Developer Guide Chapter 10 - JSR-135 - Mobile Media API // Obtain the information required to acquire the media resources player.realize(); catch (MediaException e) System.out.println("FAILED: exception for realize: " + e.toString()); // Acquire exclusive resources, fill buffers with media data player.prefetch();...
  • Page 75 Java ME Developer Guide Chapter 10 - JSR-135 - Mobile Media API 10.2 ToneControl ToneControl is the interface to enable playback of a user-defined monotonic tone se- quence. The JSR-135 Mobile Media API will implement public interface ToneControl. A tone sequence is specified as a list of non-tone duration pairs and user-defined se- quence blocks and is packaged as an array of bytes.
  • Page 76 Java ME Developer Guide Chapter 10 - JSR-135 - Mobile Media API Set the volume using a linear point scale with values between 0 and 100. Mute or unmute the Player associated with this Volume- Control. 10.4 StopTimeControl StopTimeControl allows a specific preset sleep timer for a player. The JSR-135 Mobile Media API will implement public interface StopTimeControl.
  • Page 77: Table 20 Audio Media

    Java ME Developer Guide Chapter 10 - JSR-135 - Mobile Media API 10.6.1 Audio Media File Type SP MIDI MIDI Type 0 MIDI Type 1 iMelody 10.6.2 Image Media File Type JPEG Progressive JPEG WBMP GIF 87a, 89a Table 21 Image Media 10.6.3 Video Media File Type H.263...
  • Page 78 10.7.3 File Locator File locators must be supported for playback and capture of media. This is specific to Motorola Java ME implementations supporting file system API and not as per JSR- 135. The support should be available through Manager and RecordControl imple- mentations.
  • Page 79: Table 23 Security Policy

    Java ME Developer Guide Chapter 10 - JSR-135 - Mobile Media API Capture Locator should be supported for audio and video devices. A new device "camera" must be defined and supported for camera device. Manager.createPlayer() call shall return camera player as a special type of video player. Camera player should implement VideoControl and should support taking snapShots using Video- Control.getSnapshot() method.
  • Page 80: Table 24 Permissions Within Multimedia Record

    Java ME Developer Guide Chapter 10 - JSR-135 - Mobile Media API media.control. trol.startRecord() RecordControl.re Table 24 Permissions within Multimedia Record NOTE: The Audio/Media formats may differ or may not be avaliable, depending on the Carrier or region. DRAFT - Subject to Change [80/201]...
  • Page 81 Java ME Developer Guide Chapter 11 - JSR-139 - CLDC 1.1 JSR-139 - CLDC 1.1 11.1 JSR-139 CLDC 1.1 is an incremental release of CLDC version 1.0. CLDC 1.1 is fully backwards compatible with CLDC 1.0. Implementation of CLDC 1.1 supports the following: Floating Point Data Types float and double All floating point byte codes...
  • Page 82 Java ME Developer Guide Chapter 11 - JSR-139 - CLDC 1.1 Data Type Java.lang.Float Classes Java.lang.Double Calendar and Java.util.Calendar Time Classes Java.lang.Date Exception and Java.lang.NoClassD Error Classes efFoundError Weak References Java.lang.ref.Refere DRAFT - Subject to Change (String another- noring case considera- String) tions String intern ()
  • Page 83 Java ME Developer Guide Chapter 11 - JSR-139 - CLDC 1.1 Java.lang.ref.WeakR eference Additional Utility Java.util.Random Classes Java.lang.Math DRAFT - Subject to Change details New Class: Refer to CLDC Spec for more details Double nextDouble Returns the nextpseu- dorandom, uniformly distributed double value between 0.0 and 1.0 from the random...
  • Page 84: Table 25 Additional Classes, Fields, And Methods Supported For Cldc

    Java ME Developer Guide Chapter 11 - JSR-139 - CLDC 1.1 Table 25 Additional classes, fields, and methods supported for CLDC 1.1 compliance DRAFT - Subject to Change equal to a mathemat- ical integer Static double cos Returns the trigono- (double a) metric cosine of an angle...
  • Page 85 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API JSR-177 Java ME Security and Trust 12.1 Feature Description This chapter describes the JSR-177 which defines optional packages for the Java ME platform. The purpose of this JSR is to specify a collection of APIs that provides se- curity and trust services by integrating a Security Element (SE).
  • Page 86 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API In addition to a SIM card-based implementation, an SE can also be implemented in the handset itself. Such implementation may utilize, for example, embedded chips or special security features of the hardware.
  • Page 87 12.3 New Implementation This article will only reference the APDU package of JSR 177, SATSA-APDU since it is the only one implemented on Motorola JSR 177 compliant devices. The smart card communication API is based on the Generic Connection Framework in package.
  • Page 88 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API A subset of the API or the MIDP API. APDUConnection to support APDU exchanges. APDUConnection Interface This interface extends the the APDU connection. MIDlets can use this connection to communicate with applica- tions on a smart card using APDU protocol.
  • Page 89 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API channel is acquired for the APDU connection, the implementation establishes an APDU connection with the specified application and returns the resulting connection object to the MIDlet. The implementation uses method to be used in opening an APDU connection.
  • Page 90: Table 26 Javax.microedition.io.connector.open() Bnf Syntax

    Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API Table 26 javax.microedition.io.Connector.open() BNF syntax APDU Connection Establishment Errors If a logical channel is not available for the APDU connection, the implementation throws the to the MIDlet. If a MIDlet calls method istent card slot number, the implementation throws exception.
  • Page 91 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API mand APDUs and receive response APDUs to and from the smart card. The implementation services only one logical channel (one APDU connection) at a time, i.e. current APDU procedure on channel A must complete before a new APDU procedure can begin on channel B.
  • Page 92 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API prompts the user to enter the current value of the PIN, for verification purposes. Interface APDUConnection implements method When a MIDlet calls method prompts the user to enter the value of the unblocking PIN (PIN used to unblock other PINs), the new value for the currently blocked PIN, and to re-enter the new value for the currently blocked PIN.
  • Page 93 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API throws exception. If a MIDlet attempts to exchange APDUs using the connection object created before the card was removed and then reinserted the implementation throws exception.
  • Page 94 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API it's availability status. Logical channels other than the basic channel may be closed when the connection is closed. Basic channel or channel 0 has to remain open, and cannot be closed. Error Cases When Closing APDU Connection If a MIDlet calls method nection that is executing in another thread, any pending I/O method throws...
  • Page 95 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API A MIDlet uses ENVELOPE APDUs only, to communicate with the (U)SAT application. If a MIDlet uses any APDU other than ENVELOPE APDU, the implementation throws exception.
  • Page 96 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API Control Access control governs the establishment of an APDU connection and communication using the APDU connection between terminal objects and on SE objects. The access control model is designed to achieve the following security objectives: Protect an SE from malicious MIDlets Support the SE to specify a fine-grained access control policy within the limitations of the platform...
  • Page 97 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API The implementation applies the following algorithm when evaluating a request for ac- cess: Request for Access Algorithm Use Domain Mechanism (DM) to evaluate access to the method if access is forbidden according to DM Access Denied else /* Access Granted according to DM, check ACP now */...
  • Page 98: Security Requirements

    Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API should be chosen. Implementers are not limited to using if-else statements. If the MIDlet is trying to access a method protected by the Domain Mechanism, and access to it is denied, the implementation throws If the MIDlet is trying to access a method protected by the Static Mechanism, and access to it is denied, the implementation throws...
  • Page 99 Java ME Developer Guide Chapter 12 - JSR-177 Java ME Security and Trust Services API method is protected by the The permission group. The access to methods in MIDlets in the operator's domain. method is protected by the The permission munication function group.
  • Page 100: Mobile 3D Api

    JSR-184 requires a Java ME device supporting MIDP 2.0 and CLDC 1.1 as a minimum. 13.2 Mobile 3D API The MOTORAZR maxx V6 contains full implementation of JSR-184 Mobile 3D API (http://jcp.org/en/jsr/detail?id=184). The MOTORAZR maxx V6 has also imple- mented the following: Call to return 1.0, otherwise null will be returned.
  • Page 101 13.3 Mobile 3D API File Format Support The MOTORAZR maxx V6 supports both M3G and PNG file formats for loading 3D content. The MOTORAZR maxx V6 supports the standard .m3g and .png extensions for its file formats. Mime type and not extension will be used for identifying file type.
  • Page 102: Figure 6 M3G Application Proccess

    Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API Figure 6 M3G Application Proccess Most M3G applications use an M3G resource file that contains all the information re- quired to define the 3D resources, such as objects, their appearance, lights, cameras and animations, in a scene graph.
  • Page 103: Figure 7 M3G Application Methods

    Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API Figure 7 M3G Application Methods The World object contains the objects that define a complete 3D scene - geometry, textures, lights, cameras, and animations. The World object mediates access to the objects within the world.
  • Page 104: Figure 8 Typical Midlet Structure

    Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API Figure 8 Typical MIDlet Structure 13.4.3 Initializing the world The Loader class is used to initialize the world. It has two static methods: one takes in a byte array, while the other takes a named resource, such as a URI or an indi- vidual file in the JAR package.
  • Page 105 Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API public void startApp() throws MIDletStateChangeException myDisplay.setCurrent(myCanvas); // Load a file. Objects3D[] roots = Loader.load(getAppProperty("Content-1")); // Assume the world is the first root node loaded. myWorld = (World) roots[0]; catch(Exception e) e.printStackTrace();...
  • Page 106 Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API myG3D.render(myWorld); finally myG3D.releaseTarget(); Code Sample 5 Using the Graphics3D object The final block makes sure that the target is released and the Graphics3D can be re- used. The bindTarget call must be outside the try block, as it can throw exceptions that will cause releaseTarget to be called when a target has not been bound, and re- leaseTarget throwing an exception.
  • Page 107 Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API static void traverseDescendants(Object3D obj) int numReferences = obj.getReferences(null); if (numReferences > 0) Object3D[] objArray = new Object3D[numReferences]; obj.getReferences(objArray); for (int i = 0; i < numReferences; i++) traverseDescendants(objArray[i]);...
  • Page 108 Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API on several objects, the tracks are grouped together using the AnimationController object. This allows the application to control a whole animation from one place. All the currently active animatable properties can be updated by calling animate() on the World.
  • Page 109 Java ME Developer Guide Chapter 13 - JSR-184 - Mobile 3D Graphics API You can create all your M3G content from code if necessary but this is likely to be very time consuming and does not allow 3D artists and scene designers to easily create and rework visually compelling content with complex animations.
  • Page 110 At least a JAD file size of 5 KB At least a JAR file size of 64 KB At least a RMS data size of 30 KB Any Motorola JTWI device will implement the following and pass the corresponding TCK: DRAFT - Subject to Change...
  • Page 111 Java ME Developer Guide Chapter 14 - JSR-185 - Java™ Technology for the Wireless Industry CLDC 1.0 or CLDC 1.1 MIDP 2.0 (JSR-118) Wireless Messaging API 1.1 (JSR-120) Mobile Media API 1.1 (JSR-135) 14.2 CLDC related content for JTWI JTWI is designed to be implemented on top of CLDC 1.0 or CLDC 1.1. The configura- tion provides the VM and the basic APIs of the application environment.
  • Page 112 Java ME Developer Guide Chapter 14 - JSR-185 - Java™ Technology for the Wireless Industry Hours: Digit Digit Digit Minutes: Digit Digit Digit: one of: 0 1 2 3 4 5 6 7 8 9 NOTE: Hours will be between 0 and 23, and minutes will be between 00 and 59. For example, GMT +10 and GMT +0010 equates to ten hours and ten minutes ahead of GMT.
  • Page 113 Java ME Developer Guide Chapter 14 - JSR-185 - Java™ Technology for the Wireless Industry requirements. JPEG for Image Objects - ISO/IEC JPEG together wil JFIF will be supported. The support for ISO/IEC JPEG only applies to baseline DCT, non-differential, Huffman coding, as defined in JSR-185 JTWI specification, symbol 'SOF0'.
  • Page 114 14.6 MIDP 2.0 Security specific content for JTWI The MOTORAZR maxx V6 follows the security policy outlined in the Security chapter of this developer guide. DRAFT - Subject to Change [114/201]...
  • Page 115 API which is important to this implementation rather than restating entire JSR-205; refer to the JSR-205 for more details. This section also provides Motorola specific requirements for WMA in addition to JSR-205.
  • Page 116 Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 The multipart message addressing model contains different types of addresses: global telephone number of recipient user, including telephone number, ipv4, ipv6 addresses e-mail address as specified in RFC 822 short-code of the service (not valid for MMS version 1.0) The syntax of the URL connection strings shall follow the rules specified in the JSR- 205 specification.
  • Page 117 Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 15.1.7 Multimedia Message Service Center Address The MMSC address used for sending the messages should be made available using System.getProperty with property name "wireless.messaging.mms.mmsc". Applica- tions might need to obtain the Multimedia Message Service Center (MMSC) address to decide which recipient to use.
  • Page 118: Initial Setup

    Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 15.1.9 MMS Push The registration for MMS-push mechanism and MMS-push mechanism itself shall be implemented, but applied to MMS messages in addition to what is described in the MIDP 2.0 chapter. This includes push registry and all user dialogues. When an application that is registered in the Push Registry is deleted, the corres- ponding PUSH entry shall be deleted and the corresponding application ID shall be made available for future PUSH registrations.
  • Page 119 Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 WMA shall be responsible for listening to the inbound connections for incoming MMS messages with registered Application IDs. The WMA shall launch the MMS application and suspend listening of incoming MMS messages for this Application ID.
  • Page 120 Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 The application will be responsible for the interpretation and representation of the MMS MIME content including the SMIL(presentation) content if any is attached. In the case of full incoming message buffer, any new message for the application with the same Application-ID shall be discarded.
  • Page 121 Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 Since the Application-ID / from_address in the message does not match the routing parameters registered by the client, the handling of the message shall use one of the following methods: Retain the message in the native clients Inbox, or Delete the message and display the transient notice about the removal of the message.
  • Page 122 Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 When the MMS receives a Notification, if the from_address is not present in the noti- fication, the message shall not be downloaded. A Notify Response shall be sent to the MMSC with the status set to REJECTED.
  • Page 123 Java ME Developer Guide Chapter 15 - JSR-205 - WMA 2.0 javax.wireless.messaging.mms.re ceive javax.wireless.messaging.mms.se When opening a connection, if the permission is not granted, then Connector.open method shall throw a SecurityException. When sending or receiving messages, if the permission is not granted then the Mes- sageConnection.send and the MessageConnection.receive methods shall throw a Se- curityException.
  • Page 124: Phone Memory

    Java ME Developer Guide Chapter 16 - Java ME™ Access to certificates on SIM and phone memory Java ME™ Access to certificates on SIM and phone memory This chapter presents the specification to access digital certificates on "SIM or phone memory"...
  • Page 125 Java ME Developer Guide Chapter 16 - Java ME™ Access to certificates on SIM and phone memory memory. If the certificate is not available on the device, the manufacturer domain MUST be disabled. The certificate can only be deleted or modified by the manufacturer.
  • Page 126 Java ME Developer Guide Chapter 16 - Java ME™ Access to certificates on SIM and phone memory Number of "Trusted third party protection domain" certificates to be stored in the SIM and phone memory should be at least 6. The implementation should cache SIM certificates in the phone memory at power up to avoid delay in retrieving certificates from SIM during installation/launching of a MIDlet.
  • Page 127 Java ME Developer Guide Chapter 16 - Java ME™ Access to certificates on SIM and phone memory allow certificates that are used by JVM to be deleted if needed. The user may view more detailed information about a particular certificate by highlighting the certificate name and selecting the VIEW soft key.
  • Page 128: Figure 9 Delete A Trusted Third Party Domain Root Certificate

    Java ME Developer Guide Chapter 16 - Java ME™ Access to certificates on SIM and phone memory Figure 9 Delete a Trusted Third Party Domain Root Certificate The menu to view, enable/disable certificates is already implemented by the current Synergy design. The name of the menu is Certificates and can be accessed from both the Browser menu and the Security sub-menu under the main menu.
  • Page 129 Java ME Developer Guide Chapter 16 - Java ME™ Access to certificates on SIM and phone memory 16.4 Roaming/Change of SIM card All previously authorized and installed MIDlets MUST act in accordance with the device policy when the device is roaming, or when the device SIM is changed. Newly downloaded MIDlets are authenticated to the root certificates currently available in the certificate store and authorized in accordance with the device policy.
  • Page 130 Java ME Developer Guide Chapter 17 - Prevent Downloading of Large Java MIDlets Prevent Downloading of Large Java MIDlets 17.1 Overview This feature is a flexible way of preventing the large JAR files OTA download. The current functionality is as follows: The user is able to download any JAR file independently from its file size via the WAP browser.
  • Page 131 Java ME Developer Guide Chapter 17 - Prevent Downloading of Large Java MIDlets The system shall support setting the maximum JAR file size for downloading. This feature shall apply only to JAR accompanied by JAD files download. The maximum JAR file size for the download shall be stored in the flex database.
  • Page 132: Establishing Connection

    Java ME Developer Guide Chapter 18 - Download Midlet through PC Download Midlet through PC To download MIDlets through a PC, make a connection to a PC through IrDA, Bluetooth, USB or Serial Cable (RS 232). This content considers only the RS232 con- nection using JAL.
  • Page 133 Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser Downloading MIDlet through Browser The Download MIDlet Through Browser requires the browser to be connected before performing any downloads on the handset. The example shows How user may access the Browser application by any of the fol- lowing methods: Selecting 'Browser' from the Main Menu.
  • Page 134: Figure 10 Starting Active Browser Session From Main Menu

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser Figure 10 Starting Active Browser Session from Main Menu GetJavaApps is a feature that allows an operator to insert a WAP designated URL that links to a Java ME ™ site with MIDlet suites. This feature can be found under Java Settings or in the Main Menu as it is flexible for either menu item.
  • Page 135: Figure 11 Downloading And Installing Java Me ™ Application (Midlets)

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser 19.3 Downloading MIDlets Figure 11 represents Java ME ™ Application (MIDlets) Download and Installation. Figure 11 Downloading and Installing Java ME ™ Application (MIDlets) Steps to Download and Install Java ME ™ Application: DRAFT - Subject to Change [135/201]...
  • Page 136 Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser BACK shows previous screen to the user. If the SELECT softkey is selected, the handset shows display the application size, time to install and version. If an error occurs with the descriptor file, the handset then displays the transient notice 'Failed Invalid File.' Upon Time-out, the handset goes back to browser.
  • Page 137: Figure 12 Application Does Not Have Mandatory Attributes In Adf

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser needed state in order to return the MIDlet Install Notify attribute. Upon completing Installation, the handset displays a transient notice 'Installed to Games & Apps'. Upon time-out, the handset goes back to Browser. During Installation if the MANIFEST file is wrong, the handset displays a transient notice 'Failed File Corrupt'.
  • Page 138 MIDlet. The JAD of the MIDlet has two attrib- utes, Mot-Data-Space-Requirements and Mot-Program-Space-Requirements. If an application developer adds these attributes to their JAD file, a Motorola device can determine if enough memory exists on the phone before the MIDlet is downloaded.
  • Page 139 Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser DRAFT - Subject to Change [139/201]...
  • Page 140: Figure 13 Memory Full Error

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser Figure 13 Memory full error Rules: If Mot-Data-Space-Requirements and Mot-Program-Space-Requirements attributes are present in the JAD, the above noted prompt should be displayed. This value takes into account the memory requirements of the MIDlet and the current memory usage on the phone, in order to tell the user exactly how much memory to free.
  • Page 141: Figure 14 Mot-Data-Space & Mot-Program-Space Attributes Are Not Present Or Are

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser bottom of the dialog. BACK from this message will take the user back to the browser page from which the user selected the MIDlet to download. Figure 14 Mot-Data-Space & Mot-Program-Space attributes are not present or are If Mot-Data-Space-Requirements and Mot-Program-Space-Requirements JAD attributes are not present in the JAD file, the handset can not determine how much memory to free and will display the above help...
  • Page 142: Figure 15 Memory Full Help Message During Installation Process

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser 19.4.2 Memory Full during installation process. Once the MIDlet is successfully downloaded, the installation process begins. During the installation of the MIDlet, the phone may determine there is insufficient memory to complete the installation.
  • Page 143: Application Version Already Exists

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser The installation process is canceled when this error condition occurs. The Memory Full error will no longer be a transient prompt but a dialog screen with a Help softkey and a Back softkey will be displayed. DETAILS will give the user the above Help screen explaining that additional memory is required to be able to install the MIDlet.
  • Page 144: Figure 16 Same Version Of Application Already Exists On The Handset

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser Figure 16 Same Version of Application already exists on the handset Rules: Handset checks for MIDlet-Name, MIDlet-vendor, and version number. If they are the same, a dialog 'Application Already Exists' is displayed. To know more about this error, select the DETAILS softkey.
  • Page 145: Figure 17 (Newer) Version Of Application Exists

    Java ME Developer Guide Chapter 19 - Downloading MIDlet through Browser application, the following message is displayed. The error occurred can be queried by selecting DETAILS. Figure 17 (Newer) Version of Application exists Rules: If the latest or newer version of application is already present on the handset, it cannot be downloaded.
  • Page 146 If the MIDlet has not specified a data space requirement in the JAD attribute (MIDlet_data_space_requirement) or the manifest file, a limit of 512 KB will be used as the maximum RMS space for that MIDlet. No additional Motorola implementation clarifications are necessary.
  • Page 147: Table 27 Rms Feature/Class

    Java ME Developer Guide Chapter 20 - Record Management System javax.microedition.rms package All constructors, methods, and inherited methods for the RecordStoreFullException class in the javax.microedition.rms package All constructors, methods, and inherited methods for the RecordStoreNotOpenException class in the javax.microedition.rms package All constructors, methods, and inherited methods for the InvalidRecordIDException class in the javax.microedition.rms package...
  • Page 148: Gaming Api

    Java ME Developer Guide Chapter 21 - Gaming API/Multiple Key Press Gaming API/Multiple Key Press 21.1 Gaming API The Gaming API provides a series of classes that enable rich gaming content for the handset. This API improves performance by minimizing the amount of work done in Java, decreasing application size.
  • Page 149 Java ME Developer Guide Chapter 21 - Gaming API/Multiple Key Press 21.2 Multiple Key Press Support Multi-button press support enhances the gaming experience for the user. Multi- button press support gives the user the ability to press two (2) keys simultaneously and the corresponding actions of both keys will occur simultaneously.
  • Page 150: Table 28 Gaming And Keypad Feature/Class Support For Midp

    Java ME Developer Guide Chapter 21 - Gaming API/Multiple Key Press javax.microedition.lcdui.GameCanvas to the bottom po- sition of the key Map the LEFT_PRESSED field in javax.microedition.lcdui.GameCanvas to the left posi- tion of the key Map the RIGHT_PRESSED field in javax.microedition.lcdui.GameCanvas to the right posi- tion of the key All methods and inherited methods for the Layer class in javax.microedition.lcdui.game...
  • Page 151: Network Connections

    Java ME Developer Guide Chapter 22 - Network APIs 22.1 Network Connections The Motorola implementation of Networking APIs will support several network con- nections. The network connections necessary for Motorola implementation are the following: CommConnection for serial interface HTTP connection...
  • Page 152: Table 29 Network Api Feature/Class Support For Midp

    Java ME Developer Guide Chapter 22 - Network APIs CommConnection interface in the javax.microedition.io pack- Dynamic DNS allocation through DHCP HttpConnection interface in the javax.microedition.io.package. Supported HttpsConnection interface in the javaxmicroedition.io.package SecureConnection interface in the javax.microedition.io.package SecurityInfo Interface in the javax.microedition.io.package UDPDatagramConnection interface in the javax.microedition.io.package Table 29 Network API feature/class support for MIDP...
  • Page 153 Java ME Developer Guide Chapter 22 - Network APIs bytes_read = is.read(buffer, offset, bytes_left); if (bytes_read > 0) offset += bytes_read; bytes_left -= bytes_read; while (bytes_read > 0); } catch (Exception ex) { System.out.println("IO failed: "+ ex.getMessage()); finally { closeAllStreams(i); //clean up 22.2 User Permission The user of the handset will explicitly grant permission to add additional network connections.
  • Page 154: Figure 18 Network Connections Example

    Please note that this indication is done by the imple- mentation. 22.4 HTTPS Connection Motorola implementation supports a HTTPS connection on the MOTORAZR maxx V6 handset. Additional protocols that will be supported are the following: TLS protocol version 1.0 as defined in SSL protocol version 3.0 as defined in...
  • Page 155 Java ME Developer Guide Chapter 22 - Network APIs hc[i] = null; System.out.println("Open Failed: " + ex.getMessage()); if (hc[i] != null) try { is[i] = hc[i].openInputStream(); byteCounts[i] = 0; readLengths[i] = hc[i].getLength(); System.out.println("readLengths = " + readLengths[i]); if (readLengths[i] == -1) readLengths[i] = BUFFER_SIZE;...
  • Page 156 22.7 Mechanisms for Push Motorola implementation for push requires the support of certain mechanisms. The mechanisms that will be supported for push are the following: SMS push: an SMS with a port number associated with an application used to deliver the push notification.
  • Page 157 Java ME Developer Guide Chapter 22 - Network APIs 22.8 Push Registry Declaration The application descriptor file will include information about static connections that are needed by the MIDlet suite. If all static push declarations in the application descriptor cannot be fulfilled during the installation, the MIDlet suite will not be in- stalled.
  • Page 158 Java ME Developer Guide Chapter 22 - Network APIs public static Form regForm; public static Form unregForm; public static Form mainForm; public static Form messageForm; public static Command exitCommand; public static Command backCommand; public static Command unregCommand; public static Command regCommand; public static TextField regConnection;...
  • Page 159 Java ME Developer Guide Chapter 22 - Network APIs regForm.addCommand(regCommand); regForm.addCommand(backCommand); regForm.setCommandListener(this); unregForm.addCommand(backCommand); unregForm.addCommand(unregCommand); unregForm.setCommandListener(this); messageForm.addCommand(backCommand); messageForm.setCommandListener(this); public void pauseApp(){} protected void startApp() { display.setCurrent(mainForm); public void destroyApp(boolean unconditional) { notifyDestroyed(); public void showMessage(String s) { if(messageForm.size() != 0 ) messageForm.delete(0); messageForm.append(s);...
  • Page 160 Java ME Developer Guide Chapter 22 - Network APIs new runThread().start(); if((c == unregCommand) && (s == unregForm)){ mc = c; ms = s; new runThread().start(); if((c == backCommand) && (s == unregForm )){ display.setCurrent(mainForm); if((c == backCommand) && (s == regForm )){ display.setCurrent(mainForm);...
  • Page 161 Java ME Developer Guide Chapter 22 - Network APIs if((mc == regCommand) && (ms == regForm)){ try{ PushRegistry.registerConnection("sms://:" + regConnec- tion.getString(), "Receive", regFilter.getString()); showMessage("Connection successfully registered"); } catch (Exception e){ showMessage("Unexpected " + e.toString() + ": " + e.getMessage()); if((mc == unregCommand) && (ms == unregForm)){ try{ if(registeredConnsCG.size() >...
  • Page 162 Java ME Developer Guide Chapter 22 - Network APIs public class WakeUp extends MIDlet implements CommandListener{ public static Display display; public static Form mainForm; public static Command exitCommand; public static TextField tf; public static Command registerCommand; public void startApp() { display = Display.getDisplay(this);...
  • Page 163 Java ME Developer Guide Chapter 22 - Network APIs public class regThread extends Thread{ public void run(){ try { long delay = Integer.parseInt(tf.getString()) * 1000; long curTime = (new Date()).getTime(); System.out.println(curTime + delay); PushRegistry.registerAlarm("WakeUp", curTime + delay); mainForm.append("Alarm registered successfully"); } catch (NumberFormatException nfe) { mainForm.append("FAILED\nCan not decode delay "...
  • Page 164 Java ME Developer Guide Chapter 22 - Network APIs public static Command backCommand; public static Command sendCommand; public static TextField address_tf; public static TextField port_tf; public static TextField message_text_tf; String[] binary_str = {"Send BINARY message"}; public static ChoiceGroup binary_cg; byte[] binary_data = {1, 2, 3, 4, 5, 6, 7, 8, 9}; String address;...
  • Page 165 Java ME Developer Guide Chapter 22 - Network APIs messageForm.setCommandListener(this); public void pauseApp(){ protected void startApp() { display.setCurrent(mainForm); public void destroyApp(boolean unconditional) { notifyDestroyed(); public void showMessage(String s) { if(messageForm.size() != 0 ) messageForm.delete(0); messageForm.append(s); display.setCurrent(messageForm); public void commandAction(Command c, Displayable s) { if((c == backCommand) &&...
  • Page 166 " + t.toString() + ": " + t.getMessage()); 22.9 Delivery of a Push Message A push message intended for a MIDlet on the MOTORAZR maxx V6 handset will handle the following interactions: MIDlet running while receiving a push message - if the application receiving the push message is currently running, the application will consume the push message without user notification.
  • Page 167: Figure 19 Intend Application Run Option

    Java ME Developer Guide Chapter 22 - Network APIs Figure 19 Intend Application Run Option Push registry with Alarm/Wake-up time for application - push registry supports one outstanding wake-up time per MIDlet in the current suite. An application will use the TimerTask notification of time-based events while the application is running.
  • Page 168: Network Access

    Java ME Developer Guide Chapter 22 - Network APIs 22.11 Security for Push Registry Push Registry is protected by the security framework. The MIDlet registered for the push should have the necessary permissions. Details on permissions are outlined in the Security chapter. 22.12 Network Access Untrusted applications will use the normal HttpConnection and HttpsConnection APIs to access web and secure web services.
  • Page 169 Java ME Developer Guide Chapter 23 - Platform Request API Platform Request API 23.1 Platform Request API The Platform Request API MIDlet package defines MIDP applications and the interac- tions between the application and the environment in which the application runs. Refer to Table 30 for Platform Request API feature/class support for MIDP 2.0: Feature/Class All constructors, methods, and inherited classes for...
  • Page 170: Table 30 Platform Request Api Feature/Class Support For Midp

    Java ME Developer Guide Chapter 23 - Platform Request API Table 30 Platform Request API feature/class support for MIDP For MIDP 2.0, the javax.microedition.midlet.MIDlet.platformRequest () method should be used and called when the MIDlet is destroyed. The following code sample is an example of the Platform Request API: Start a Call MIDlet.platformrequest("tel:88143593")
  • Page 171 Java ME Developer Guide Chapter 23 - Platform Request API 23.3 MIDlet Request of a URL that Initiates a Voice Call If the requested URL takes the form , the handset will use this re- quest to initiate a voice call as specified in RFC2806. If the MIDlet will be exited to handle the URL request, the handset will only handle the last request made.
  • Page 172: Manifest

    Descriptor attributes as outlined in the JSR-118. Table 31 lists all MIDlet attributes, descriptions, and its location in the JAD and/or JAR manifest that are supported in the Motorola implementation. Please note that the MIDlet will not install if the MIDlet-Data-Size is greater than 512k.
  • Page 173 Java ME Developer Guide Chapter 24 - JAD Attributes suite MIDlet-Vendor The organization that provides the MIDlet suite. MIDlet-Icon The case-sensitive absolute name of a PNG file within the JAR used to represent the MIDlet suite. MIDlet-Description The description of the MIDlet suite.
  • Page 174: Table 31 Midlet Attributes, Descriptions, And Its Location In The Jad And/Or Jar

    Java ME Developer Guide Chapter 24 - JAD Attributes critical to the function of the MID- let suite. MIDlet-Permissions-Opt Zero or more permissions that are non-critical to the function of the MIDlet suite. MIDlet-Push-<n> Register a MIDlet to handle in- bound connections MIDlet-Install-Notify The URL to which a POST request...
  • Page 175: Table 32 Lcdui Api Specific Interfaces Supported By Motorola Implementation

    Java ME Developer Guide Chapter 25 - LCDUI 25.1 LCDUI API Table 32 lists the specific interfaces supported by Motorola implementation: Interface Description Choice Choice defines an API for user interface components im- plementing selection from a predefined number of choices.
  • Page 176: Table 33 Lcdui Api Specific Classes Supported By Motorola Implementation

    Ticker Implements a "ticker-tape", a piece of text that runs con- tinuously across the display. Table 33 LCDUI API specific classes supported by Motorola implementation Refer to Table 34 for LCDUI feature/class support for MIDP 2.0: Feature/Class All fields, constructors, methods, and inherited methods for the Alert class in the javax.microedition.lcdui package...
  • Page 177 Java ME Developer Guide Chapter 25 - LCDUI Will provide and play an audible sound when the play Sound() method is called with an AlertType of ERROR Will provide and play an audible sound when the play Sound() method is called with an AlertType of WARNING Will provide and play an audible sound when the play Sound() method is called with an AlertType of CONFIRMA- TION...
  • Page 178 Java ME Developer Guide Chapter 25 - LCDUI javax.microedition.lcdui package All fields, constructors, methods, inherited fields, and in- herited methods for the DateField class in the javax.microedition.lcdui package All fields, methods, and inherited methods for the Display class in the javax.microedition.lcdui package Maximum colors for the numColors() method in javax.microedition.lcdui.Display All methods and inherited methods for the Displayable...
  • Page 179: Table 34 Feature/Class Support For Midp

    Java ME Developer Guide Chapter 25 - LCDUI All constructors, methods, and inherited methods for the TextBox class in the javax.microedition.lcdui package All fields, constructors, methods, inherited fields, and in- herited methods for the TextField class in the javax.microedition.lcdui package Visual indication with UNEDITABLE field set will be provided All constructors, methods, and inherited methods for the...
  • Page 180 Java ME Developer Guide Chapter 26 - iTAP 26.1 Intelligent Keypad Text Entry API When users are using features such as SMS (short message service), or "Text Mes- saging", they can opt for a predictive text entry method from the handset. The Java ME environment has the ability to use SMS in its API listing.
  • Page 181: Table 35 Itap Feature/Class

    Java ME Developer Guide Chapter 26 - iTAP Predictive text capability will be offered when the constraint is set to ANY User will be able to change the text input method during the input process when the constraint is set to ANY (if predictive text is available) Multi-tap input will be offered when the constraint on the text input is set to EMAIL- ADDR, PASSWORD, or URL Table 35 iTAP feature/class...
  • Page 182 Java ME Developer Guide Chapter 27 - Java.lang Implementation Implementation 27.1 java.lang support Motorola implementation for the port additional system properties beyond what is outlined in the JSR-118 specifica- tion. The additional system properties are as follows: Cell ID: The current Cell ID of the device will be returned during implementation.
  • Page 183 Java ME Developer Guide Chapter 28 - CommConnection Interface CommConnection Interface 28.1 CommConnection The CommConnection interface defines a logical serial port connection. A logical serial port connection is a logical connection through which bytes are transferred serially. This serial port is defined within the underlying operating system and may not correspond to a physical RS-232 serial port.
  • Page 184 Java ME Developer Guide Chapter 28 - CommConnection Interface 28.3 Parameters The first parameter will be a port identifier, which is a logical device name. These port identifiers are The valid identifiers for a particular device and OS can be queried through the A list of ports, separated by commas, is returned which can be combined with a comm: prefix as the URL string to open a serial port connection.device specific and...
  • Page 185: Table 36 Interface Commconncetion Optional Parameters

    Java ME Developer Guide Chapter 28 - CommConnection Interface Table 36 Interface Commconncetion optional parameters 28.4 BNF Format for Connector.open () string The URI must conform to the BNF syntax specified in Table 37. If the URI does not conform to this syntax, an BNF syntax <comm_connection_string ::= "comm:"<port_id>[<options_list>] ;...
  • Page 186 Java ME Developer Guide Chapter 28 - CommConnection Interface plementing profile. The security model will be applied on the invocation of the method with a valid serial port connection string. Should the applic- ation not be granted access to the serial port through the profile authorization scheme, a method.
  • Page 187: Table 38 Method Summary

    Java ME Developer Guide Chapter 28 - CommConnection Interface 28.6 Port Naming Convention Logical port names can be defined to match platform naming conventions using any combination of alphanumeric characters. Ports will be named consistently among the implementations of this class according to a proposed convention. VM implementa- tions will follow the following convention: Port names contain a text abbreviation indicating port capabilities followed by a sequential number for the port.
  • Page 188 Java ME Developer Guide Chapter 29 - Motorola Get URL from Flex API Motorola Get URL from 29.1 Overview This feature allows accessing URL stored in FLEX by a Java application. Carriers flex the URL, which is used for content download, into the phone just like any invisible net URL.
  • Page 189 Java ME Developer Guide Chapter 29 - Motorola Get URL from Flex API tion in flex table. The Java Application will be able to access the flexed URL by System.getProperty method. The key for accessing the URL is "com.mot.carrier.URL". The method System.getProperty will return NULL if no URL is flexed.
  • Page 190 Chapter 30 - Motorola Secondary Display API Motorola Secondary This chapter details the capability for J2ME applications to render content to Motorola devices that feature a secondary display. Motorola P2K Java ME ™ enabled devices currently support the standard low-level and high-level APIs for UI development for the primary display only.
  • Page 191 Java ME Developer Guide Chapter 30 - Motorola Secondary Display API The secondary display API must not support any input elements like Choice, Item, Text-Field etc. Secondary display API must support setting Ticker on secondary display. The Secondary Display API must support key event processing. Key mappings will be supported for Voice and Camera/Smart keys.
  • Page 192 Java ME Developer Guide Chapter 30 - Motorola Secondary Display API 30.3 Exception Handling For portability purposes, the design of the API will allow the developer to handle Ex- ceptions related to the instantiation of the secondary display context. Appropriate ex- ceptions should be generated for invocation of methods not supported by secondary display.
  • Page 193 Appendix A - Key Mapping Key Mapping Table 39 identifies key names and corresponding Java assignments. All other keys are not processed by Java. STAR (*) POUND (#) JOYSTICK LEFT JOYSTICK RIGHT JOYSTICK UP JOYSTICK DOWN SCROLL UP SCROLL DOWN SOFTKEY 1 SOFTKEY 2 MENU...
  • Page 194: Table 39 Key Mapping

    Appendix A - Key Mapping CENTER SELECT DRAFT - Subject to Change PHONENUMBER constraint set. SELECT Handled according to Motorola specifica- tion: Pause/End/Resume/Background menu invoked. Table 39 Key Mapping [194/201]...
  • Page 195: Memory Management

    Appendix B - Memory Management Calculation Memory Management The available memory on the MOTORAZR maxx V6 is the following: 64 MB shared memory for MIDlet storage 4Mb Heap size DRAFT - Subject to Change Appendix B Calculation [195/201]...
  • Page 196 The MOTODEV developer program is online and provides access to Frequently Asked Questions about enabling technologies on Motorola products. Access to dynamic content based on questions from the Motorola Java ME developer community is available at the URL stated below.
  • Page 197: Figure 20 Graphic Description Of Http Range

    Java ME Developer Guide Appendix D - HTTP Range Appendix D HTTP Range Graphic Description Figure 20 shows a graphic description of HTTP Range: Figure 20 Graphic Description of HTTP Range DRAFT - Subject to Change [197/201]...
  • Page 198 Appendix F - Spec Sheet Spec Sheet Listed below is the spec sheets for the MOTORAZR maxx V6. The spec sheet contains information regarding the following areas: Technical Specifications Key Features Java ME Information Motorola Developer Information Tools Other Related Information...
  • Page 199: Technical Specifications

    Some features are network, subscription and SIM card or service provider dependent and may be not available in all areas. MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. The Bluetooth® word mark and logos are owned by the Bluetooth SIG, Inc. and any use of such marks by Motorola is under license. Java and all Java- based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
  • Page 200: Quick Reference

    Appendix H - Quick Reference Quick Reference CLDC: 12 20 20 22 81 81 111 111 HTTP: 26 47 154 154 197 JAD: 25 26 27 58 58 59 59 59 59 60 60 134 137 137 138 142 146 157 157 170 170 172 JSR-118: 30 31 156 172 182 DRAFT - Subject to Change Appendix H...

Table of Contents