background image

24 
LCDUI

  

 

99

 

All fields, constructors, methods, inherited fields, and inherited 
methods for the TextField class in the javax.microedition.lcdui package 

Supported 

Visual indication with UNEDITABLE field set will be provided 

Supported 

All constructors, methods, and inherited methods for the Ticker class 
in the javax.microedition.lcdui package 

Supported 

OEM Lights API providing control to the lights present on the handset 

Supported, Fun Lights API 

All fields, constructors, methods, inherited fields, and inherited 
methods for the TextField class in the havax.microedition.lcdui 
package 

Supported 

 

Table 23 LCDUI feature/class 

Summary of Contents for C381P J2ME

Page 1: ...Technical Manual Version 01 00 Motorola C381p Handset J2ME Developer Guide ...

Page 2: ...FORM MICRO EDITION J2ME 15 THE MOTOROLA J2ME PLATFORM 16 MIDP 1 0 16 RESOURCES AND API S AVAILABLE 17 3 DEVELOPING AND PACKAGING J2ME APPLICATIONS 18 GUIDE TO DEVELOPMENT IN J2ME 18 4 DOWNLOADING APPLICATIONS 20 METHOD OF DOWNLOADING 20 ERROR LOGS 21 OTA AND DOWNLOAD 22 5 APPLICATION MANAGEMENT 24 DOWNLOADING A JAR FILE WITHOUT A JAD 24 MIDLET UPGRADE 24 INSTALLATION AND DELETION STATUS REPORTS 25...

Page 3: ...SAGE TYPES 43 SMS MESSAGE STRUCTURE 43 SMS NOTIFICATION 43 11 PHONEBOOK ACCESS API 49 PHONEBOOK ACCESS API 49 PHONEBOOK ACCESS API PERMISSIONS 49 12 TELEPHONY API 54 DIALER CLASS 54 CLASS DIALEREVENT 54 CLASS DIALER 56 getDefaultDialer 57 setDialerListener 57 startCall 58 startCall 58 sendExtNo 58 endCall 59 INTERFACE DIALERLISTENER 59 SAMPLE DIALERLISTENER IMPLEMENTATION 59 notifyDialerEvent 61 C...

Page 4: ... already exists 81 Newer Application Version Exists 82 18 LIGHTWEIGHT WINDOWING TOOLKIT 84 19 UDP SUPPORT 85 20 SHARED JAD URLS 86 OVERVIEW 86 TELL A FRIEND OPTION 86 Accessing Tell A Friend from SMM 87 Downloading through Browser 88 Downloading from PC Via serial USB 88 Downloading through MMS 89 21 GET URL FROM FLEX API 90 OVERVIEW 90 FLEXIBLE URL FOR DOWNLOADING FUNCTIONALITY 90 SECURITY POLICY...

Page 5: ...DE 115 IMPLEMENTATION BASED ON RECOMMENDED SECURITY POLICY 116 TRUSTED 3RD PARTY DOMAIN 116 TRUSTED MIDLET SUITES USING X 509 PKI 117 SIGNING A MIDLET SUITE 117 SIGNER OF MIDLET SUITES 118 MIDLET ATTRIBUTES USED IN SIGNING MIDLET SUITES 118 CREATING THE SIGNING CERTIFICATE 118 INSERTING CERTIFICATES INTO JAD 119 CREATING THE RSA SHA 1 SIGNATURE OF THE JAR 119 AUTHENTICATING A MIDLET SUITE 119 VERI...

Page 6: ...7 Figure 7 Memory full error 79 Figure 8 Mot Data Space Mot Program Space attributes are not present or are incorretct 80 Figure 9 Memory Full help message during installation process 81 Figure 10 Same Version of Application already exists on the handset 82 Figure 11 Latest Newer Version of Application exists 83 Figure 12 the MIDlet Manager and the context sensitive menus 88 Figure 13 Java service...

Page 7: ...s support for JSR 135 39 Table 10 Messaging features classes supported 44 Table 11 Interface Summary 54 Table 12 Class Summary 54 Table 13 Field Summary 55 Table 14 Constructor Summary 55 Table 15 Field Details 56 Table 16 Method Summary 57 Table 17 Key Ranking Priority 68 Table 18 Performed on a suite 87 Table 19 Gaming and keypad feature class 93 Table 20 ITAP feature class 94 Table 21 Interface...

Page 8: ...2 0 114 Table 27 Protected Functionality fot top line of prompt 117 Table 28 Dialog Prompts for MIDP 2 0 Permission Types 117 Table 29 Actions performed upon completion of signer certificate verification 120 Table 30 MIDlet suite verification 121 Table 31 Audio Mix 122 ...

Page 9: ...1 Java lang support 29 Code Sample 2 Socket Connection 32 Code Sample 3 HTTPS Connection 34 Code Sample 4 JSR 135 Mobile Media API 36 Code Sample 5 JSR 120 Wireless Messaging API 48 Code Sample 6 Phonebook API 53 Code Sample 7 DialerListener Implementation 60 ...

Page 10: ...including without limitation the implied warranties of merchantability and fitness for a particular purpose are given only if specifically required by applicable law Otherwise they are specifically excluded No warranty is made as to coverage availability or grade of service provided by the products or services whether through a service provider or otherwise No warranty is made that the software wi...

Page 11: ...and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the designing or manufacture of the p...

Page 12: ... Telecommunication Union JAD Java Application Descriptor JAL Java Application Loader JAR Java Archive Used by J2ME applications for compression and packaging J2ME Java 2 Micro Edition JSR 120 Java Specification Request 120 defines a set of optional APIs that provides standard access to wireless communication resources JVM Java Virtual Machine KVM Kilo Virtual Machine LWT Lightweight Windowing Tool...

Page 13: ...cribes how to package a J2ME application how to package a MIDlet and generate JAR and JAD files properly Chapter 4 Downloading Applications this chapter describes the process for downloading applications Chapter 5 Application Management this chapter describes the lifecycle installation de installation and updating process for a MIDlet suite Chapter 6 JAD Attributes this chapter describes what attr...

Page 14: ... application Chapter 22 File System Access API this chapter describes the File System API Chapter 23 Multiple Key Press this chapter describes the Multiple Key Press Chapter 24 ITAP this chapter describes iTAP support Chapter 25 LCDUI this chapter describes the LCDUI Chapter 26 Auto Launch of Midlet this chapter describes the Auto Lanch of Midlet Chapter 27 Background Applications this chapter des...

Page 15: ...a new very small application environment It is a framework for the deployment and use of Java technology in small devices such as cell phones and pagers It includes a set of APIs and a virtual machine that is designed in a modular fashion allowing for scalability among a wide range of devices The J2ME architecture contains three layers consisting of the Java Virtual Machine a Configuration Layer a...

Page 16: ... written in standard MIDP it can also run applications that take advantage of the unique functionality provided by these APIs These OEM APIs are described in this guide MIDP 1 0 J2ME is the version of Java that the mobile device will support It was developed to support devices with limited memory i e mobile devices pagers SIM cards J2ME maintains the qualities that Java technology has become famou...

Page 17: ...1p handset MIDP 2 0 Application delivery and billing Application lifecycle Application signing model and privileged security model End to end transactional security HTTPS Networking Persistent storage Sounds Timers User Interface File Image Support PNG JPEG GIF Additional Functionality WMA JSR 120 MMA JSR 135 Phonebook API Telephony API ...

Page 18: ...www corej2me com http www javaworld com As an introduction brief details of J2ME are explained below The MIDlet will consist of two core specifications namely Connected Limited Device Configuration CLDC and Mobile Information Device Profile MIDP Both of these specifications Java Specification Requests can be located at the http www jcp org site for reading For MIDP 1 0 JSR 37 should be reviewed Fo...

Page 19: ...ich can be free or purchased These IDEs come from a range of sources such as Sun IBM Metrowerks and Borland to name a few For a look at such environments review the Motorola T720 Handset Developer Guide which is available from the MOTOCODER website 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 c...

Page 20: ...he JAR file can be downloaded directly The information about the MIDlet will be pulled from the manifest file The transport mechanism used to download the file will be one of two depending on the support from the network operators WAP Gateway and the size of file requested HTTP Range see specification RFC 2068 at http www rfc editor org rfc html if content greater than 30k in size Below is a ladde...

Page 21: ...s done the handset displays a transient notice Download Completed and starts to install the application Upon completing installation the handset displays a dialog Install complete To dismiss this dialog press OK If the MANIFEST file is wrong the handset displays a dialog stating Installation failed Package invalid To dismiss this dialog press OK If JAD does not contain mandatory attributes Install...

Page 22: ...al to Checksum in MIDlet JAR SHA attribute Application not authorized Installation failed Package invalid MIDlet Launching Security Certificates expired or removed Application Expired MIDlet Execution Authorization failure during MIDlet execution Incorrect MIDlet Application Error Table 1 Error Logs OTA and Download Comply with OTA User Initiated Provisioning Specifications in MIDP 2 0 The user MU...

Page 23: ...ze of JAR file 8 Bytes Max Applicable Terminal Type not specified Application program introduction Midlet description 512 Bytes Max Information Fee Media price 32 Bytes Max Table 2 JAD file information End user should be able to delete the applications downloaded ...

Page 24: ... from the JSR 118 will be followed to help determine if the data from an old MIDlet should be preserved during a MIDlet upgrade When these rules cannot determine if the RMS should be preserved the user will be given an option to preserve the data The following conditions are used to determine if data can be saved If the cryptographic signer of the new MIDlet suite and the original MIDlet suite are...

Page 25: ... version of an application currently in the handset Unauthorized MIDlets will not have access to any restricted function call AMS will check the JAD for security indicated every time a installation is initiated Application descriptor or MIDlet fails the security check the AMS will prevent the installation of that application and notify the user that the MIDlet could not be installed Application de...

Page 26: ...ys the MIDP version that is being used in the handset Data Space This displays the amount of free memory available for data used by the applications i e phone book entries game high scores Program Space This displays the amount of free memory available for applications Heap Size This is the amount of runtime memory available in the handset for J2ME applications Table 4 Java System menu ...

Page 27: ...e JAR file Allows configuration specific attributes parameters to be supplied to the MIDlet s without modifying the JAR file Motorola has implemented the following support for the MIDP 2 0 Java Application Descriptor attributes as outlined in the JSR 118 The Table 5 ists all MIDlet attributes descriptions and its location in the JAD and or JAR manifest that are supported in the Motorola implementa...

Page 28: ...AD Yes or no if included in the JAR Manifest MicroEdition Configuration The J2ME Configuration required i e CLDC 1 0 Yes or no if included in the JAD Yes or no if included in the JAR Manifest MIDlet Permissions Zero or more permissions that are critical to the function of the MIDlet suite MIDlet Permissions Opt Zero or more permissions that are non critical to the function of the MIDlet suite MIDl...

Page 29: ...perties can only be accessed by trusted MIDlets The additional system properties are as follows Cell ID The current Cell ID of the device will be returned during implementation IMEI The IMEI number of the device will be returned during implementation The Code Sample 1 shows java lang support System getProperty phone mcc System getProperty phone mnc System getProperty phone imei System getProperty ...

Page 30: ...E READ_WRITE The timeouts parameter for the open method in the Connector class of the javax microedition io package Supported HttpConnection interface in the javax microedition io package Supported HttpsConnection interface in the javax microedition io package Supported SecureConnection interface in the javax microedition io package Supported SecurityInfo interface in the javax microedition io pac...

Page 31: ...nnection Socket Connection import javax microedition io import java io import javax microedition midlet try open the connection and io streams sc SocketConnection Connector open socket www myserver com 8080 Connector READ_WRITE true is sc i openInputStream os sc i openOutputStream catch Exception ex closeAllStreams System out println Open Failed ex getMessage if os null is null try os write someSt...

Page 32: ...S connection on the Motorola C381p handset Additional protocols that will be supported are the following TLS protocol version 1 0 as defined in http www ietf org rfc rfc2246 txt SSL protocol version 3 0 as defined in http home netscape com eng ssl3 draft302 txt The Code Sample 3 shows the implementation of HTTPS HTTPS import javax microedition io import java io import javax microedition midlet try...

Page 33: ...t offset 0 int bytes_left int readLengths i do bytes_read is i read buffer offset bytes_left offset bytes_read bytes_left bytes_read byteCounts i bytes_read while bytes_read 0 System out println byte read byteCounts i catch Exception ex System out println Downloading Failed ex getMessage numPassed 0 finally try is i close is i null catch Exception ex close http connection if hc i null try hc i clo...

Page 34: ...8 Network APIs 34 catch Exception ex hc i null Code Sample 3 HTTPS Connection ...

Page 35: ...l follow the guidelines and control types listed in the sections outlined below The Code Sample 4 shows the implementation of the JSR 135 Mobile Media API JSR 135 Player player Create a media player associate it with a stream containing media data try player Manager createPlayer getClass getResourceAsStream MP3 mp3 audio mpeg catch Exception e System out println FAILED exception for createPlayer e...

Page 36: ...e media playback try player start catch MediaException e System out println FAILED exception for start e toString Pause the media playback try player stop catch MediaException e System out println FAILED exception for stop e toString Release the resources player close Code Sample 4 JSR 135 Mobile Media API ToneControl ToneControl is the interface to enable playback of a user defined monotonic tone...

Page 37: ...anipulating the audio volume of a Player The JSR 135 Mobile Media API will implement public interface VolumeControl The following describes the different volume settings found within VolumeControl Volume Settings allows the output volume to be specified using an integer value that varies between 0 and 100 Specifying Volume in the Level Scale specifies volume in a linear scale It ranges from 0 100 ...

Page 38: ...t used to control and render media that is specific to the content type of the data Manager provides access to an implementation specific mechanism for constructing Players For convenience Manager also provides a simplified method to generate simple tones Primarily the Multimedia API will provide a way to check available supported content types Audio Media The Table 7 depicts the multimedia file f...

Page 39: ...rited methods for the Manager Class in javax microedition media Supported TONE_DEVICE_LOCATOR support in the Manager class of javax microedition media Supported TONE_DEVICE_LOCATOR content type will be audio x tone seq Supported TONE_DEVICE_LOCATOR media locator will be device tone Supported All constructors and inherited methods in javax microedition medi MediaException Supported All fields and m...

Page 40: ...35 Mobile Media API 40 Note If two wave plays have the same frequency they can mix See Appendix A mix audio table Player number limitation 4 and MIDI size limitation is 150K MP3 stream size has the limitation ...

Page 41: ...oves running on the handsets This can take the form of chess moves being passed between two players via the WMA Motorola in this implementation of the specification supports the following features Creating a SMS Sending a SMS Receiving a SMS Viewing a SMS Listening to a SMS SMS Client Mode and Server Mode Connection The Wireless Messaging API is based on the Generic Connection Framework GCF which ...

Page 42: ... recipient to send a response to the message that will be received by this MessageConnection However when a client type MessageConnection is used for sending a message with 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 MessageConnection Please refer to the section A 4 0 and A 6 0 ...

Page 43: ...east three 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 SMS Notification Examples of SMS interaction with a MIDlet would be the following A MIDlet will ...

Page 44: ...or the MessageListener interface in the javax wireless messaging package Supported All methods and inherited methods for the TextMessage interface in the javax wireless messaging package Supported Number of concatenated messages 40 messages in inbox each can be concatenated from 10 parts at max No limitation on outbox immediately transmitted Table 10 Messaging features classes supported The Code S...

Page 45: ...ctor open sms 18473297274 9532 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 setPa...

Page 46: ...tion of binary message setting of payload for binary message and calling of method numberOfSegments Message for Binary message BinaryMessage binMsg MessageConnection connClient int MsgLength 140 Create connection for client mode connClient MessageConnection Connector open sms outAddr Create BinaryMessage for client mode binMsg BinaryMessage connClient newMessage MessageConnection BINARY _MESSAGE C...

Page 47: ... set payload for the message to send set address for the message to send messageToSend setAddress sms 18473297274 9532 send message via invocation of send method set address for the message to receive receivedMessage setAddress sms 9532 receive message via invocation of receive method class JSR120Sample1Listener implements MessageListener Runnable private int messages 0 public void notifyIncomingM...

Page 48: ...10 JSR 120 Wireless Messaging API 48 e toString Code Sample 5 JSR 120 Wireless Messaging API ...

Page 49: ...e Motorola C381p handset This API will specify a base storage class for all types of contacts items presented in the vCard specification RFC2426 vCard MIME Directory Profile vCard 3 0 Specification In addition schema strings used in querying and storing contact information are those specified in the RFC2426 specification The Phonebook Access API will perform the following functions Allow multiple ...

Page 50: ...ng of update int index int sortOrder method phbkRec type PhoneBookRecord HOME int newIndex phbkRec update index PhoneBookRecord SORT_BY_NAME Sample of code for calling of delete int index int sortOrder method PhoneBookRecord delete index PhoneBookRecord SORT_BY_NAME Sample of code for calling of deleteAll method PhoneBookRecord deleteAll Sample of code for calling of getRecord int index int sortOr...

Page 51: ...evice int sortOrder method get number of used records int numberRecsUsedPhone PhoneBookRecord getUsedRecords PhoneBookRecord PHONE_MEMORY PhoneBookRecord SORT_BY_NAME int numberRecsUsedSim PhoneBookRecord getUsedRecords PhoneBookRecord SIM_MEMORY PhoneBookRecord SORT_BY_NAME int numberRecsUsedAll PhoneBookRecord getUsedRecords PhoneBookRecord ALL_MEMORY PhoneBookRecord SORT_BY_NAME Sample of code ...

Page 52: ...No PhoneBookRecord PHONE_MEMORY int speedNo_sim PhoneBookRecord getNewSpeedNo speedNo PhoneBookRecord PHONE_MEMORY int speedNo_all PhoneBookRecord getNewSpeedNo speedNo PhoneBookRecord PHONE_MEMORY Sample of code for calling of getDeviceType int speedNo method int speedNo 1 int type PhoneBookRecord getDeviceType speedNo Sample of code for calling of setPrimary int index int sortOrder method int in...

Page 53: ...ecord PHONE_MEMORY Sample of code for calling of toVFormat OutputStream out int index int outFormat int sortOrder method int index 1 ByteArrayOutputStream outStream new ByteArrayOutputStream PhoneBookRecord toVFormat outStream index PhoneBookRecord VCARD_3_0 PhoneBookRecord SORT_BY_NAME System out println Contents of the output stream System out print new String outStream toByteArray Code Sample 6...

Page 54: ...and Class Summary Interface Summary DialerListener The DialerListener interface provides a mechanism for the application to be notified of phone call event Table 11 Interface Summary Class Summary Dialer The Dialer class defines the basic functionality for start and end phone call DialerEvent The DialerEvent class defines phone call events Table 12 Class Summary Dialer Class The dialer Class can b...

Page 55: ...nt static byte PHONE_VOICECALL_TIMEOUT Phone process timeout event static byte PHONE_VOICECALL_UNHOLD Current java phone call was unheld event Table 13 Field Summary The Table 14 describes the Constructor Summary Constructor Summary DialerEvent Table 14 Constructor Summary The following methods are inherited from class java lang Object equals getClass hashCode notify notifyAll toString wait The Ta...

Page 56: ...atic final byte PHONE_VOICECALL_HOLD Current java phone call was held by native phone event PHONE_VOICECALL_UNHOLD public static final byte PHONE_VOICECALL_UNHOLD Current java phone call was unheld event PHONE_VOICECALL_DTMF_FAILURE public static final byte PHONE_VOICECALL_DTMF_FAILURE Send extension number error event Table 15 Field Details Class Dialer The Dialer class defines the basic function...

Page 57: ...blic static Dialer getDefaultDialer Get a Dialer instance setDialerListener public void setDialerListener DialerListener listener Registers a DialerListener object The platform will notify this listener object when a phone event has been received to this Dialer object There can be at most one listener object registered for a Dialer object at any given point in time Setting a new listener will impl...

Page 58: ...id startCall String teleNumber String extNo throws IOException start a phone call using given telephone number and extension number Parameters telenumber the telephone number to be call extNo the extension number to be send Throws IOException if the call could not be created or because of network failure NullPointerException if the parameter is null SecurityException if the application does not ha...

Page 59: ...vent without needing to have a listener thread If multiple event arrive very closely together in time the implementation has calling this listener in serial Sample DialerListener Implementation Dialer listener program import java io IOException import javax microedition midlet import javax microedition io import com motorola public class Example extends MIDlet implements DialerListener Dialer dial...

Page 60: ...UT your process break case DialerEvent PHONE_VOICECALL_HOLD your process break case DialerEvent PHONE_VOICECALL_UNHOLD your process break case DialerEvent PHONE_VOICECALL_DTMF_FAILURE your process break Required MIDlet method release the connection and signal the reader thread to terminate public void pauseApp try dialer endCall catch IOException e Handle errors Required MIDlet method shutdown par...

Page 61: ...his method MUST return quickly and MUST NOT perform any extensive operations The application SHOULD NOT receive and handle the message during this method call Instead it should act only as a trigger to start the activity in the application s own thread Parameters dialer the Dialer where the TAPI voice call event has arrived event the TAPI voice call event type Class Hierarchy class java lang Objec...

Page 62: ...ry for the available device connections data cable as well as the available data speeds This API should be in line with the CLDC javax microedition io Version 1 02 In addition the following changes must be added over the CLDC standard Automatic baud rate detection Addition of more parity options specifically mark and space Support for 1 5 stop bits as a common UART feature Changes to port names as...

Page 63: ... wav mp3 Image files png gif The SMS messages for each MIDlet are managed by the MIDlet Creating a Message The API enables creating of SMS messages The addressing is compliant with the standard SMS addressing as specified in the GSM standards The content of the message can be constructed using one or more of the content types specified in chapter 10 of this document Sending a Message The SMS API p...

Page 64: ...tension 64 Viewing a Message The APIs should provide a way to get a list of messages that is associated with a specific application and to view the messages Deleting a Message The API should provide a way to delete SMS messages ...

Page 65: ...menu icon These 10 pixels are not counted in the 54 pixels reserved for the J2ME Canvas display The soft keys and menu icon located in the 10 pixel reserved area are rendered in 11 high font The soft keys and menu icon follow noted below o MIDlet UI design can be designated in the J2ME Style Guide or Developer Guide but implementation is still decided by the developer The application supports the ...

Page 66: ...DP devices are required to read PNG images that are encoded with either interlace method 0 None or interlace method 1 Adam7 Image loading in MIDP is synchronous and cannot be overlapped with image rendering There is no advantage for an application to use interlace method 1 Support for decoding interlaced images is required for compatibility with PNG and for the convenience of developers who may al...

Page 67: ... map to a right action key Motorola Standard Key Set The following keys are not available to the J2ME application and are retained by the handset for Motorola specific usage regardless of J2ME application processing These keys and associated actions will always retain a higher priority than the J2ME application This will ensure that some minimal level of control is always available to the handset ...

Page 68: ...s display the BACK command on the left soft key position The MENU icon and Right soft key shall remain blank If the BACK key is pressed the J2ME application is destroyed and the handset shall return back to the J2ME Application Manager screen If the global command list is populated but does not contain one of the following commands BACK CANCEL EXIT then the handset shall always display the BACK co...

Page 69: ...pplication indicates that the following global commands are active SCREEN CANCEL HELP OK and STOP The handset display would look like this Figure 3 Active Global Commands Cancel Screen OK Help Stop Power Key When the Power key is pressed and held down it should always override all applications and power down the handset ...

Page 70: ... by mapping the 2 key to UP command 8 key to DOWN command 4 key to LEFT command and 6 key to RIGHT command In addition the FIRE key should be mapped to the SELECT key if present otherwise to the right soft key and the 5 key Additional game action keys exist these are the GAME A GAME B GAME C and GAME D keys They perform different game actions depending on the game being played GAME A should be map...

Page 71: ...rs and sub menus Application Resources The DRM application resources table must be updated to provide for the display of the following Small icon no deletion Large icon no deletion Softkey name Common name Application Keys J2ME applications must be able to be assigned to the application keys of the device The options for application keys will be dependent on the device being used This includes dev...

Page 72: ...will have a standard PNG image displayed Next to the MIDlet name Softkey Labels The softkey name of the app must be truncated if the name is too long after all available space is used In the rare occasion that there are two applications with the same name ex two calculator apps basic and advanced the second application name must be truncated followed by the number 2 Effect of Master Clear or Maste...

Page 73: ...et The example shows How user may access the Browser application by any of the following methods Selecting Browser from the Main Menu Pressing a dedicated Browser key on the keypad if available on the handset Pressing a Browser soft key from the idle display if assigned Using Browser shortcut if assigned Selecting URL from a message Selecting GetJavaApps from the Main Menu or Java Settings ...

Page 74: ...nected to the WAP browser different locations may be visited where J2ME Applications may be downloaded From here a MIDlet may be selected to download to the handset Handset initially receives information from the Java Application Descriptor JAD file The JAD includes information about MIDlet name version vendor MIDlet Jar URL MIDlet Jar size and MIDlet Data size Two additional JAD attributes will b...

Page 75: ... Application 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 If the CANCEL softkey is selected it shows the Browser Application Card from wher...

Page 76: ...including any partial JAR files and temporary files created during the download process When downloading is done the handset displays a transient notice Download Completed The handset then starts to install the application The handset displays Installing After an application is successfully downloaded a status message must be sent back to the network server This allows for charging of the download...

Page 77: ...ient to the server per Over the Air User Initiated Provisioning specification If JAD does not contain mandatory attributes Failed Invalid File notice appears If JAD does not contain mandatory attributes Failed Invalid File notice appears Figure 6 Application does not have Mandatory Attributes in ADF Different Error Checks Memory Full There are two distinct cases when a Memory Full error can occur ...

Page 78: ...r these attributes are present In cases where there is not enough memory to download the application the user MUST be given a message to delete existing applications in order to free additional memory The following messages and screen flows will be displayed depending on whether specific JAD attributes are present or not ...

Page 79: ...ue of the program space should be on separate lines The download 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 detailed Help screen describing the memory required to be able to download the MIDlet The Help dialog will in...

Page 80: ...elp data can be displayed on a single screen This label should disappear when the user has scrolled to the bottom of the dialog All rules stated in the previous figure must also be followed for the above stated prompt 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...

Page 81: ... able to install the MIDlet The Help dialog will include a More right softkey label for those products in which not all the help data can be displayed on a single screen This label should disappear when the user has scrolled to the 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 Application version already ...

Page 82: ...og Application Already Exists is displayed To know more about this error select the DETAILS softkey Handset displays the new version of the application as well as the existing application Newer Application Version Exists If the application version on the handset is newer than the downloaded version of application the following message is displayed The error occurred can be queried by selecting DET...

Page 83: ...17 Download MIDlet Through Browser 83 Figure 11 Latest 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 84: ...h means it can be easily added to a MIDP implementation and minimize dependencies and maintenance overhead This also allows standard MIDlets to mix both MIDP screens and LWT screens in their MIDlets LWT is designed to use MIDP low level graphics routines exclusively which adds to the ease of implementation Although no device specific modifications are required an LWT implementation may be tailored...

Page 85: ... Service This enhancement allows for J2ME applications to utilize the UDP header compression format for data applications over IP The API should follow the guidelines of the User Datagram Protocol standard IETF RFC 768 J Postel August 28 1981 This functionality should be available for both CSD and GPRS connections ...

Page 86: ... address When J2ME applications are downloaded via PC or MMS a new JAD attribute shall specify the JAD URL address Tell A Friend Option When entering the J2ME application context sensitive menu a Tell A Friend option will be provided Upon selecting this option the standard SMS messaging form will appear The link to the URL where the application JAD file can be found and its name will be pre popula...

Page 87: ...lus the application name size exceed the maximum size allowed for an SMS message the following rules shall be applied in this order to truncate the link o Remove application name from link i e GP http www mot com games gp jad shall be truncated to http www mot com games gp jad o Remove path to the JAD file keeping only server s URL and application name i e GP http www mot com games gp jad shall be...

Page 88: ...nloading a J2ME application the browser shall provide JAM with the URL of the JAD file This URL shall override the URL specified by Mot Midlet URL attribute in case of conflict Downloading from PC Via serial USB Rules When downloading an application JAM shall use the JAD attribute Mot Midlet URL if present to get the JAD URL ...

Page 89: ...20 Shared JAD URLs 89 Downloading through MMS Rules When downloading an application via MMS JAM shall use the JAD attribute Mot Midlet URL if present to get the JAD URL ...

Page 90: ...lity allows carriers to specify the URL for content download Flexible URL for downloading functionality The URL is flexed using RadioComm or using OTA provisioning The URL will follow the rules mentioned below All URLs used shall follow the guidelines outlined in RFC1738 Uniform Resource Locators URL Refer to http www w3 org addressing rfc1738 txt for more information URLs are limited to 128 chara...

Page 91: ...21 Get URL from Flex API 91 Security Policy Only trusted applications will be granted permission to access this property ...

Page 92: ...ton press across these sets or with other keys will not be supported Set 1 Nav Up Nav Down Nav Right Nav Left Refer to the Table 19 for gaming and keypad feature class support for MIDP 2 0 Feature Class Implementation lcdui game package Supported setBacklight as defined in javax microedition lcdui Display Supported setVibrator as defined in javax microedition lcdui Display Supported All constructo...

Page 93: ...in javax microedition lcdui game Layer Supported All fields constructors methods and inherited methods for the Sprite Class in javax microedition lcdui game Sprite Frame height will not be allowed to exceed the height of the view window in javax microedition lcdui Layer Supported Any limited by heap size only Sprite frame width will not be allowed to exceed the width view of the view window in jav...

Page 94: ...e of the iTAP method can greatly decrease text entry time Its use extends beyond SMS text messaging but into other functions such as phonebook entries The following J2ME text input components will support iTAP javax microedition lcdui TextBox The TextBox class is a Screen that allows the user to edit and enter text javax microedition lcdui TextField A TextField is an editable text component that w...

Page 95: ...teractive items within a Form231 screen Table 21 Interfaces supported by Motorola implementation The Table 22 lists the specific classes supported by Motorola implementation Classes Description Alert An alert is a screen that shows data to the user and waits for a certain period of time before proceeding to the next Displayable AlertType The AlertType provides an indication of the nature of alerts...

Page 96: ...ntaining a list of choices Screen The common superclass of all high level user interface classes Spacer A blank non interactive item that has a settable minimum size StringItem An item that can contain a string TextBox The TextBox class is a Screen that allows the user to enter and edit data TextField A TextField is an editable text component that will be placed into a Form Ticker Implements a tic...

Page 97: ...cdui package Supported Truncate an image in a Choice object if it exceeds the capacity of the device display Supported Truncation of very long elements will not occur in a Choice object Text in forms is wrapped and scrolled Will display a portion of long elements to display and provide a means for the user to view all of the parts of the element Supported Truncation in elements w line breaks will ...

Page 98: ...ported DOTTED stroke style Supported SOLID stroke style Supported All methods and inherited methods for the Image class in the javax microedition lcdui package Supported All fields constructors methods inherited fields and inherited methods for the ImageItem class in the javax microedition lcdui package Supported All fields methods and inherited methods for the Item class in the javax microedition...

Page 99: ...be provided Supported All constructors methods and inherited methods for the Ticker class in the javax microedition lcdui package Supported OEM Lights API providing control to the lights present on the handset Supported Fun Lights API All fields constructors methods inherited fields and inherited methods for the TextField class in the havax microedition lcdui package Supported Table 23 LCDUI featu...

Page 100: ...message to the midlet The client originating the request is notified that the midlet is already running No midlets are active In this case the KVM must launch the midlet the message is intended for Upon successfully starting KVM should inform the client that the launch has been successful The KVM is currently busy either running another midlet or installing another midlet Since the KVM will suppor...

Page 101: ...und attributes will continue running when not in focus in the background mode or when the flip is closed if the MIDlet is flip insensitive MIDlets are able to accept incoming data if they are running in the background For example The phonebook application can automatically synchronize new entries when in background mode Background MIDlet When a MIDlet with background attributes is running the user...

Page 102: ... be blocked When in the Java Service Menu the following apply when selected Suspend suspends the background MIDlet Resume brings the background MIDlet to the foreground and multimedia resources will be available for the MIDlet End destroys the background MIDlet Run in background lets the MIDlet continue to run in the background Note A Java icon will be displayed in the status bar Flip Behaviors A ...

Page 103: ...cations i e phone book entries game high scores Program Space This displays the amount of free memory available for applications Heap Size This is the amount of runtime memory available in the phone Table 24 Function Describes MIDlet Manager Menu The MIDlet Manager menu lets the user perform certain actions on the selected MIDlet suites The table 25 describes the various actions that can be perfor...

Page 104: ...fferent from the JAR file size due to ROMizing The details of the applications are shown in a Synergy Text field For future releases the title of the text field is the application name however for the current release it will show in the Figure 14 The information shown in the text fields are MIDlet suite name vendor version number of apps in suite data space and program space The name vendor versio...

Page 105: ...nd all persistent data must be deleted from the device and the menu item must be removed The user is returned back to Main Menu The text from the MIDlet s JAD Attribute MIDlet Delete Confirm MUST be displayed The text may be truncated to 70 characters Also note that this text cannot be translated If the MIDlet Delete Confirm attribute is not present this information will not be displayed IF the us...

Page 106: ...pletely delete After deleting an application a transient dialog will be displayed indicating to the user that the file and all its contents have been deleted The transient delete animation dialog is displayed with the text Deleted Newline and the application name The pre installed applications will be dependent on handset type carrier and region requirements Pre Installed MIDlet Suites will contai...

Page 107: ...peck scenario when trying to access URLs across applications and additional value add in content service delivery J2ME Invisible NET Options J2ME applications can embed Invisible Net URLs within the J2ME components or within J2ME context sensitive menus such as Games Apps and Java Tools as listed in the following sections J2ME Component Options A product utilizing the Motorola J2ME solution should...

Page 108: ...etup Web Sessions Redesign for more information on application and data connection session parameters o Upon exiting the active browser or HTTP session the user shall be returned to the Java menu from which the browser was launched from Games and Apps menu or Java Tools menu o J2ME menu items must be approved by Technical Marketing CxD and Product Marketing o Position of the Invisible Net J2ME men...

Page 109: ...ntext sensitive menus Prompt Requirements All prompts referred to in this document must be flexible The following rules apply Position of J2ME menu list items and context sensitive menu prompt items must be approved by the appropriate representatives from the product team the region the customer CxD and Technical Marketing All prompts including menu list items must be approved via the CR process a...

Page 110: ...sensitive menu item prompts must be flexible easy to change and provision as customization will be necessary by region and customer All J2ME menu or context sensitive menu item prompts and URL addresses must be accessible through the PRI interface The phone shall be flexed to allow URLs within J2ME in one of the following combinations URLs allowed in the Games and Apps menu URLs allowed in the Jav...

Page 111: ...to a PC through IrDA Bluetooth USB or Serial Cable RS 232 This content considers only the RS232 connection using JAL Establishing Connection When a successful connection to a PC is made an application can be downloaded The MS should display that a connection has been made Only one connection will be active at a time ...

Page 112: ...ointing to snake jad the corresponding application descriptor file for snake jar Operator sends an SMSmessage to all the mobiles with the URL for snake wml embedded inside When the Synergy message center receives the message it is treated as a browser message and the go to browser option is available The user selects the Go To option to launch a browser that goes to theURL embedded inside the mess...

Page 113: ...methods and inherited methods for the CertificateException class in the javax microedition pki package Supported MIDlet Certificate attribute in the JAD Supported A MIDlet suite will be authenticated as stated in Trusted MIDletSuites using X 509 of MIDP 2 0 minus all root certificates processes and references Supported Verification of RSA 1 signatures with a SHA 1 message digest algorithm Supporte...

Page 114: ...ill execute in the untrusted domain where access to protected APIs or functions is not allowed or allowed with explicit confirmation from the user Untrusted Domain Any MIDlet suites that are unsigned will belong to the untrusted domain Untrusted domains handsets will allow without explicit confirmation untrusted MIDlet suites access to the following APIs javax microedition rms RMS APIs javax micro...

Page 115: ...the description of these sets of permissions as they relate to the handset Allowed Full Access permissions are any permissions that explicitly allow access to a given protected API or function from a protected domain Allowed permissions will not require any user interaction User permissions are any permissions that require a prompt to be given to the user and explicit user confirmation in order to...

Page 116: ... the user to configure permission settings for each MIDlet when the VM is not running This menu is synchronized with available run time options Implementation based on 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 ...

Page 117: ...09 PKI Public Key Infrastructure mechanism the handset will be able to verify the signer of the MIDlet suite and bind it to a protection domain which will allow the MIDlet suite access to the protected API or function Once the MIDlet suite is bound to a protection domain it will use the permission defined in the protection domain to grant the MIDlet suite access to the defined protected APIs or fu...

Page 118: ...orresponding attribute in the manifest JAR file if not the MIDlet suite will not be installed The attributes MIDlet Permissions Opt are ignored for unsigned MIDlet suites The untrusted domain policy is consistently applied to the untrusted applications It is legal for these attributes to exist only in JAD only in the manifest or in both locations If these attributes are in both the JAD and the man...

Page 119: ...ignature is base64 encoded and formatted as a single MIDlet Jar RSA SHA1 attribute without line breaks and inserted into the JAD It will be noted that the signer of the MIDlet suite is responsible to its protection domain root certificate owner for protecting the domain s APIs and protected functions therefore the signer will check the MIDlet suite before signing it Protection domain root certific...

Page 120: ... be validated Authentication fails JAR installation is not allowed More than one full certification path is established and validated Implementation proceeds with the signature verification using the first successfully verified certificate path for authentication and authorization Only one certification path established and validated Implementation proceeds with the signature verification Table 29...

Page 121: ...own Root certificate missing Application not installed JAR signed a certificate on the path is expired Authentication can not be completed JAR installation will not be allowed The following error prompt will be shown Expired Certificate Application not installed JAR signed a certificate rejected for reasons other than expiration JAD rejected JAR installation will not be allowed The following error...

Page 122: ...o No No Yes No Yes Tone sequence No No No No No Yes No Yes WAV No No Partly yes No No Yes No Yes MP3 No No No No No Yes No Yes AMR No No No No No Yes No No MIDI Yes Yes Yes Yes Yes No No Yes Video w audio No No No No No No No No Video w o audio Yes Yes Yes Yes No Yes No no Table 31 Audio Mix NOTE If two wave plays have the same frequency they can mix ...

Page 123: ...LECT followed by NUM5 6 NUM6 7 NUM7 8 NUM8 9 NUM9 STAR ASTERISK POUND POUND JOYSTICK LEFT LEFT JOYSTICK RIGHT RIGHT JOYSTICK UP UP JOYSTICK DOWN DOWN SCROLL UP UP SCROLL DOWN DOWN SOFTKEY 1 SOFT1 SOFTKEY 2 SOFT2 MENU SOFT3 MENU SEND SELECT Also call placed if pressed on lcdui TextField or lcdui TextBox with PHONENUMBER constraint set CENTER SELECT SELECT END Handled according to Motorola specifica...

Page 124: ...es keys that will be assigned to game actions defined in GameCanvas class of MIDP 2 0 Action First Set Second Set Third Set Non simultaneous keys Left Nav LEFT 4 Right Nav RIGHT 6 Up Nav UP 2 Down Nav DOWN 8 Game_A 0 Game_B 1 Game_C 3 Game_D 5 Game_Fire 9 7 ...

Page 125: ...gement Calculation 125 Appendix C Memory Management Calculation Available Memory The available memory on the Motorola C381p handset is the following Shared memory for MIDlet storage and removable memory 800k Bytes Heap size ...

Page 126: ...rogram is online and able to provide access to Frequently Asked Questions around enabling technologies on Motorola products Access to dynamic content based on questions from the Motorola J2ME developer community is available at the URL listed below http www motocoder com ...

Page 127: ...Appendix E HTTP Range 127 Appendix E HTTP Range Graphic Description The following is a graphic description of HTTP Range Figure 16 Description of HTTP Range ...

Page 128: ...Spec Sheet Listed below is the spec sheet for the Motorola C381p handset The spec sheet contains information regarding the following areas Technical Specifications Key Features J2ME Information Motorola Developer Information Tools Other Related Information ...

Page 129: ...IDlet storage Shared User Mem 1 5 MB Interface connections HTTP Socket UDP Serial port Maximum number of sockets 4 Supported image formats PNG JPEG Double buffering Yes Encoding schemes ISO8859_1 ISO10646 Input methods Multitap iTAP Additional API s JSR 120 JSR 135 Moto LWT Phonebook Telephone API Audio WAV MIDI MP3 Video No Photo Capture No Motorola Developer Information Developer Resources at ht...

Page 130: ...stered in the U S Patent Trademark Office All other product or service names are the property of their respective owners Java and all other Java based marks are trademarks or registered trademarks of Sun Microsystems Inc in the U S and other countries Motorola Inc 2004 ...

Reviews: