"CMCC-MOTOROLA CUP" J2ME Contest Technical FAQ of Motorola
J2ME Q & A -DEVICE 388C Q: 388C and J2ME development related basic parameters? A: CLDC 1.0 and midp 1.0 ComplianTamount of Storage for MIDLETS ----------- Up to 2.7Mbjava Runtime Memory --------------------- -------- 2.5MB.Recommended Maximum Midlet Suite Size ------- 1MB.Maximum Record Store Size --------------------- -100 kb.display available to midlets ---------------- 240x 276.color ---------------------- -------------------------------------- HTTP, SOCKET, UDP, Serial Port .Maximum persistent connections ---------------------- 4.Supported Image Formats ------------------- -------- png.double buffering ----------------------------- supported.encoding schemes ----- ------- ISO8859_1, ISO10646.PNG Transparency -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- Supported
T720Q: T720 and J2ME development related basic parameters? A: CLDC 1.0 and Midp 1.0 Compliantamount of Storage for MIDLETS ----------- Up to 1.0MB (640K Application 415k Data) .java Runtime Memory ------------ ----------------- 512kb.Recommended Maximum MIDLET Suite Size ------------- 200kb.maximum record store size ------- --------------- 63 kb.display available to midlets ---------------- 120 x 160.color ------- ------------------------------------------ 4KConnection Interfaces ----- ------- HTTP, SOCKETS, UDP.MAXIMUM NUMBER of Sockets -------------------------- 3.supported image formats - ------------------------- png.double buffering --------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- Supported. J2METM LWT Support ------------------------- Supported
388 Q: 388 and J2ME development related basic parameters? A: CLDC 1.0 and midp 1.0 Compliantamount of Storage for MIDLETS ----------- Up to 1.4Mbjava Runtime Memory --------------------- ---------------------------------------------------------------------------------- 100 kb.display Available to Midlets ----------------------------------------- ----------------------- 4-level grayscaleconnection interfaces ------------ HTTP, SOCKET, UDP, Serial Port.maximum Persistent Connections ---------------------- 4.Supported Image Formats --------------------- ------ png.double buffering ---------------------------- Unsupported.Encoding Schemes ------- ----- Unicode, ISO8859_1, ISO10646, UTF-8.PNG Transparency --------------------------- Supported. J2METM LWT Support ------------------------- Supported V60i Q: V60i and J2ME development related basic parameters? A: CLDC 1.0 and Midp 1.0 Compliantamount of Storage for MIDLETS --------------- Up to 1MB (768K Application 243KB Data) Java Runtime Memory ---------- ------------------- 350kb.Recommended Maximum Midlet Suite Si --------------------------- ----------- 100 kb.display available to midlets ---------------- 96X 64.color ------------ -------------------------------------- Black / WhiteConnection Interfaces -------- ------------------ HTTP, SocketMaximum Persistent Connections --------------------- 3.supported Image Formats -------------------------- png.double buffering ------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------- Supported. J2METM LWT Support ------------------------- Supported
J2ME Q & A -SDK / IDE1 Q:. Where can I download Motorola SDK for J2ME A:? You can go to the following link to download 90 days trial version Metroerks Codewarrior IDE for Java from CMCC Java Contest web site or from below web site. The Motorola SDK will in the directory: C: / ProgramFiles / Metrowerks / CodeWarrior / Java_Support / MotoSDKhttp: //developers.motorola.com/developers/wireless/tools/2 Q:. Is it possible to code a voice recorder and storing program ? using J2ME Looking over MIDP, I find such functionality (voice input) does not exist does Motorola have a device specifice classes A:.? The os of Motorola Java enabled devices such as A388 runs standard CLDC / MIDP The only extended classes we. ........................... ..
3. Q: I've downloaded LWT you provide for developing J2ME programs, and put LWT.zip in the derectory of lib / for Sun's J2ME wireless toolkit However, when I run the program, I can not see how the program will. run on the Motorola's mobile phone but only some texts in the console window A:. The LWT development tools provided here contain the class files and documentation needed to develop J2ME applications that use these features on LWT-enabled devices such as the Accompli 388. These tools do not allow LWT to be added to devices that do not already support it. When you add LWT classes to a tool, it does not mean you are adding an emuloator for Motorola LWT enabled phone. If you want to simmulate your applications in an Motorola phone such as A388 emulator, you can use Metrowerks CodeWarrior IDE, which you can download 30 days trial version from the following link, it contains A388 emulator.http: //developers.motorola.com/developers/wireless/tools/
4. Q: I have set up an ota-server (based on win2000, orion) and area Downloading Midlets to an affinpli 388. IT Works Fine for all but one of the midlets i Have Tested, of Course That The One We need to be able to download ... For this MIDlet the JAD file are downloaded and the information displayed on the phone. When I thereafter accept to download the JAR it responds 'Invalid OTA Server' and aborts. This MIDlet is possible to download via cable and The only Difference That I Can See Bigr (SIZE OF JAR IS 70KB). COULD THATEAR IS? A: The Most of Idea Most: 1. The MOSTELATION FAILED: 1. The Most files you can install in A388 is about 200 files. When you exceed this number, your installation will fail.2. The size of the jar file, we recommend not to exceed 100KB. If you downloaded a compressed jar file, it will decompress into Much Bigger File when Install it.so when you download Midlet to a388, please keep in mind About The File Number and Jar File Size. for your situation, IT IS hard to say ing the failure is because of the jar size. You May Test it out using infrared installation instead.
100 KB IS A Recommended Size. It is the advently limit. Normal. Normal 20-30 KB IS Good for Installation on Phone Devices. If The File Can Be OK., The Size Should Be OK.
5. Q: Is there any way to access the voice notes recordings using J2ME calls In other words, can one write a J2ME program that accesss voice notes recordings and use them as the developer see fit (ex sending them over to the net?. Using https? How About Using VoiceXML? IF NOT, IS THERE ANY OTHER WAY TO Send The Voice Data To The Internet? A: To My Knowledge, There I Way To Write An J2ME Application To Access / Store Notes. 6. Q: I am writing a J2ME program which try to display some images on the Accompli 6288 phone When I conduct the testing and use the images (PNG format) from the demo programs provided by Sun Microsystem, it can display without any problem However.. , when I replace the image with the one (also PNG format) produced by Photoshop, it can not be display. I choose a JPEG image and saved it as PNG format. Does the J2ME in A6288 just handle a part of the PNG encoding? A : A6288 supports 4 level gray scale. You can use the numcolors () Method to Determine The Number of Col . Ors on your device Attempting to use color images on a grayscale device will greatly increase memory use, and significantly decrease performance.7 Q:. Does J2ME for A6288 support socket, because I found it from the specification If A6288 supports socket, in. What Way I Can Use it. Can you rovide me some Samples? A: A6288 Supports socket.here is an example:
import javax.microedition.midlet *;. import javax.microedition.lcdui *;. import javax.microedition.io *;. import java.io. *; public class socketConn extends MIDlet implements CommandListener, Runnable {private int state; private static Final Int State_send = 1; private static final int state_read = 2; private display display = null;
String url = "socket: // Your Server IP Address: Your Server Port"; private Thread thread = null; StreamConnection c; InputStream is = null; OutputStream os = null; TextBox oTextBox; Command sendCommand = new Command ( "Send", Command.screen, 1); Command Readcommand = New Command ("Read", Command.Screen, 1); Public SocketConn () {Super (); System.out.Println ("Inside MIDlet Constructor ..."); Display = Display.getdisplay (this);} public void connection () {try {system.out.println ("Making Socket Connection ..."); c = (streamconnection) Connector.Open (URL); is = C.OpenInputStream (); Os = c.OpenOutputstream ();} catch (connectionNotFoundExce E) {system.out.prin ... 8. q: Can you confirm this for me and direct me to a copy of the ota provisioning specification for the Accubli 388.A: Motorola Acom MPLI 388/6288 is The Device Supports Ota. Here Is The Link The OTA SPEC. D Ocumentation:
http://developers.motorola.com/developers/wireless/global/uk/other/OTA.pdf9 Q:.. I heard that Motorola's J2ME MIDP provides implementation for the StreamConnectionNotifier and StreamConnection Interface If so, where can I download Motorola's J2ME IMPLEMENTATION?
A: The functions you are asking about are available in all J2ME CLDC / MIDP certified implementations including Motorolas The functions can be found in the CLDC specification StreamConnection is defined in javax.microedition.io.StreamConnection...
. We have been providing our J2ME implementation to Metrowerks for integration into CodeWarrior I believe it is available in CodeWarrior 6.0 and up.Please visit our website for wireless information: http:. //Developers.motorola.com/developers/wireless/10 Q :. how to transfer these data to a PC-application (eg for printing) The builtin applications (calendar etc.) do this by synchronizing with the TrueSync software on a PC, but how can we achieve this from inside a MIDP- application? A: there is no way to transfer RMS Data from Phone to a PC.
For our GSM j2me enabled phone Accompli 388/6288, you can download j2me app. To the phone via IrDA, data cable, or OTA (Over The Air) download. If you want to download j2me app. Via IrDA and data cable, you must have TrueSync software installed on your PC first, the TrueSync software comes with the phone. For OTA download, you can type in the URL of a midlet and download it to the phone. An Installation screen will be shown after the download has been completed You can death. It by backing the screen instructions.
11. Q: We can not get HttpConnection to work from a MIDP application on the Accompli 388. Network access is via GPRS MIDlet runs fine and connects from any MIDP emulator GPRS connection is also working fine from WML browser The application just hangs on... .................. ..
A:... The Http connection runs slow on A388 Try a URL that does not have too much contents that will make it faster to retrieve information Even with that it still takes several minutes You also can try using CSD to connect instead of using . GPRS This way you can figure out if it is because the GPRS network traffic slows down the connection.Please visit our website for wireless information: http: //developers.motorola.com/developers/wireless/
12. Q: I'm trying to install a midlet than I'm developing on a Accompli A388, and after downloading it I always get the same error message:. Instalation failed That midlet works perfectly in several simulators as well as MIDP for Palm . devices I downloaded others midlets that I have developed in the A388 and all of them work perfectly Could you tell me what can I do Where is the error in the pplication manager in my midlet what exaclty A:.????? First, I recommend you to check your manifest file Sometimes even missing a carriage return will cause the installation failure If you are sure about your manifest file, keep in mind for two restrictions for A388:.. First restriction will be the size of the app you try to install and the second is a restriction imposed by Motorola -. the Accompli canonly hold about 200 files (according to their tech-support) Thus if you have a lot of files already installed on the phone and then download an application which increases the overall File Number To over 200, You'll Get An "Installation Failure" .if The Jar File Size Is Too Big, IT Will Also Cause Installation Failure.
The Midlet may run perfectly in all kind of emulators But the real devices has memory and speed limitation That's why for these kind of limited devices, we need to keep the jar size as small as possible.13 Q:... I am developing a midlet and currently testing on an Accompli 388 and Nokia 9210. The Nokia 9210 is able to provide a console where System.outs can be displayed however the Accomplia 388 does not provide such functionality - or does but I just have not found it Could. you please direct me to the methods in debugging midlets with the Accomplei 388.A: Accompli 388 does not have the functionality for System.out That will need yourself to write some code in your program if you want to show some debugging information.. You can pass the error message to a stringItem THEN POST It on the screen (IE Form).
14. Q: is there any way to force the Accompli to use an external modem / network connection instead of making phone calls as we are trying to debug an Internet midlet and it is rather costly and inconvenient.A: There is no way to force Accompli 388 to use an external modem / network connection. If you are trying to debug an internet midlet, should you really have to load it on the device (you can use some tools ie Codewarrior IDE to debug first). Or you can choose GPRS as your network connection as long as the operator provide this service because GPRS connection service charges you by the amount of data transferred (how many bytes) instead of counting how long you've spent online.
J2ME Q & a -Programming
Q: Is 388C not only 24 × 24 Chinese characters can be used? Such a big font gives a lot of obstacles to good interface design. Do you know if you can call a small font? A: 388c only supports 24 × 24, English can be 24 × 24 and 24 × 12. If you want to use a small font, you need to draw your own map and make a resource file.
Q: 388c size is 240 * 276, but after I put a 240 * 240 graphic, the screen will automatically give me a vertical scroll bar, don't know why? A: 270 * 276 is included in "OK" below And the size of the "Cancel" button. Therefore, the picture of 240 × 240 is not displayed. Q: Ask the requirements of CreateImage () on the PNG file. A: The picture format is required to be PNG1.0.
Q: Does 388C, T720 support the transparent format PNG? A: Support.
Q: 388C The scale of the 388C Simulator screen is the same? A: The 388c screen displayed on the computer is slightly larger than the real machine.
Q: What is the Chinese default code on 388C? The Chinese displayed on A: 388C is a Unicode encoding format, and three Chinese formats can also be accepted: ISO 10646, ISO8859_1, and UTF-8.
Q: I want to do custom fonts with Fontmaker, but MIDP's DOC seems to say that you can't customize the font, is it? A: Yes
Q: What is the sound support for the T720, 388C? A: The KJAVA platform in T720 does not support sound, only mono (warning tone). 388C has an extended API that supports sound, you can play the sound of IMELODY and GPRT format.
Q: Collect and display data with 388C, can it be possible? A: Use serial ports to achieve data acquisition and display.
Q: How much K can? A: 640K in the 388C RAM? A: 640K
Q: Is there an optimization of T720 and 388C? For example, the system implements double buffer? A: Yes, they all support double buffers.
Q: Is it / n in the java language in the string? "JSLJG / NSDLGJFD" is this? I want to implement branch in TextField. A: Use "String 1" "/ N" "String 2" or "String 1" "/ R" "String 2" to implement a string.
Q: How to display a long string? A: Since the font is large, the user cannot customize the font, making the long string more troublesome. If you can't display it, you can display multiple lines, and use the DrawString function in Canvas.
Q: How to generate a random number? A: Use the following method: random r1 = new random (); int = r1.nextint ();
Q: Can I join a TextField / TextBox in Canvas? A: The truth cannot be added to CANVAS, which cannot add TextField or TextBox in Canvas.
Q: I want to add any controls that can receive an external Click response in Canvas, not Button or. Just as the string on the screen can also click the same, can you implement it? A: Canvas is a low-level control, you should choose a more advanced control, such as Form, Canvas can only accept key and pointer messages, you can rewrite a class inherited Canvas, you will be able to handle the Canvas's PointerPressed function.
Q: I want to join Command.ok anywhere in Screen, can not be implemented, it seems to be directly used by addcommand (New Command ("3", Command.ok, 0))), or what other methods are implemented? A: Add a Command button in the Form, which can only be placed at the bottom end, which cannot be changed. If you want to make the location flexible, you have to draw a specified location yourself in Canvas, the size of the button is set, and you can't use CommandListener to respond to the user action through the key or PointerPressed function, and perform related operations. Q: Can you define three commands in the lower part of an interface? Is there any space I can use in the interface? A: Only 2 Commands can only be defined at the bottom of the screen.
Q: I want to show a big picture now, but I am afraid that the memory is not enough. I saw the original code of ImmutableImage, but the decode function is Native. So I want to see if this kind of virtual machine code, or you can tell me the picture size if it is percent, the picture can create and display it normally? A: The code of the virtual machine cannot be seen. The picture size does not know the proportion of split memory. The picture is more, the speed of the program will slow down, you must try it yourself.
Q: If all pictures, all pictures, etc. are integrated into code, is it efficient? A: The picture is still good as a resource file
Q: I don't know how to set the font in the textarea, I looked at the font class, saying what it can't construct a class, I don't know how to set it! A: In J2ME, the user is not allowed to set fonts like TextField, which is not allowed by the device manufacturer.
Q: Chinese display problem. In the following code, c = (httpConnection) connector.open; inputStream instream = c.openinputstream (); int CH = 0; while ((ch = instream.read ())! = -1) {B.Append ((char) ch);} instream.close (); c.close (); t = new textbox ("http text", b.toString (), 1024, 0); operation results do not display correctly in TextBox Chinese (there is Chinese characters in the page pointing to the page), but if you add system.out.println (b.toString ());, it is displayed under the console. A: Please use the InputStreamReader to solve the garbled problem displayed in Chinese.
Q: I want to read the already saved data, what kind of reading? But I use GetRecordStore (int ID); useless, only to output a few characters, what should I do? A: It is recommended to use the following method. BYTE [] GetRecord (Int Recordid) Returns a Copy of The Data Stored in The Given Record. Int getRecord (int recordid, byte [] buffer, int offset) Returns the data stored in The Given Record
Q: My program needs to use username and password control, want to use the network data source, how to implement it? A: The server side should be HTTP Server, which is recommended to use the servlet / JSP technology. The structure is inevitably a standard three-layer structure, the front is the J2ME client, the middle is a JSP / servlet, connected through the DB behind the database through the JDBC, if the J2ME structure of the Client end is not considered, the background is actually a web site.q: Has no What API directly passes my RMS database to my own computer A: 388C can pass the serial operation, transfer the contents of the RMS database to the computer.
Q: I am going to display a Waiting for the FORM page before sending an HTTP POST request, but is not displayed. Be sure to wait for my HTTP request to complete it, why? These operations are placed in the event listener of Command. A: You should use another thread to process the display waiting form.
Q: Can J2ME read ZIP files? A: No.