When developing the MOTO product, you may encounter some details. It is annoying, but it is often difficult for many people. Below are some of the problems I have obtained from my actual development experience and hope to help you learn.
Several details about the development of motorolaj2s
When developing the MOTO product, you may encounter some details. It is annoying, but it is often difficult for many people. Below are some problems I have obtained from my own development experience.
This article provides four details that need to be paid attention to during the development of Motorola mobile phones using j2s for your reference!
1. MotorolaV series j2's icon display
Motorola's V-series cell phone's j2_program icons must be 15*15 in size, and the Icon name must be specified in the MIDlet-Icon, not just in the MIDlet-1. Nokia's mobile phone is indeed only available here.
2. Restrictions on storage space
If the RMS bucket of Motorola's mobile phone is not specified in MIDlet-Data-Size, the default bucket is 8 K or 12 K. I cannot remember it clearly. Therefore, the specific RMS Size must be given in MIDlet-Data-Size. Generally, MOTO phones support up to 64 kB RMS space.
3. Network download of Motorola
For MOTO mobile phones sold in China, the network connection points are fixed to CMWAP by default. Therefore, the general method of connecting to the j2s network cannot pass through the CMWAP gateway. There are two solutions.
1) Change the connection point on the mobile phone. In fact, you only need to create a new connection point without entering any information, and then set the default connection point above, it will automatically become a CMNET connection point. In this case, you can access the network in the general mode of j2-based network.
2) use the CMWAP connection method. This requires some changes to the program.
For example, I want to download a data file: http: // 211.136.87.234/1.png
The Code is as follows:
- c=(HttpConnection)Connector
- .open("http://10.0.0.172:80/1.png,Connector.READ,true);
- c.setRequestProperty("X-Online-Host","211.136.87.234");
- c.setRequestProperty("Accept","*/*");
- is=c.openInputStream();
10.0.0.172 is the mobile CMWAP gateway.
4. When using WTK104 for packaging, there is no MIDP2.0 support
We recommend that you use WTK for packaging when testing the mobile Baobao. In this way, the APIS called by CLASS files are the purest. However, most of MOTO's mobile phones are MIDP2.0, while WTK104 only supports MIDP1.0. An error occurs during packaging.
The solution is the same as that of NOKIA. Manually add several MIDP2.0 APIs to lib \ midpapi.zip and wtklib \ emptyapi.zip in WTK. Use WinRar software and drag it directly from the moto sdk.