Deploying MIDlets onto Mobile Devices
by, 11-26-2011 at 07:43 PM (2240 Views)
The subject topic is very interesting and a lot of people have asked me about this. It is just a matter of knowing how this works. I am sure you will find it very interesting.
MIDlets are programmed using Java Development environments like Eclipse, JBuilder,Netbeans or Sun Java wireless Toolkit. Once coded, they are build and tested on emulators. When all the tests are passed, you want to finally deploy it to your mobile device to see how it works in real world scenerio.
There are actually two ways to deploy MIDlets.
- transferring JAR through dada cable
- transferring JAR through web
For testing, the first method is OK but it cannot be used for mass distribution, since you cannot even think of transferring JARs to hundreds and thousands of mobile phones.
We will transfer the JARs through a PC to the phone. There are few options to do this:
- Explicit physical connection via USB cable
- Direct InfraRed (IR) connection
- Direct Bluetooth connection
which option to choicer, depends on the cell phone you have.
Will will need a USB cable for the first option, which is provided by your phone manufacturer and also there will be a software from the manufacturer. Do read the manual before opting this.
You may also use InfraRed and Bluetooth options as well.
If your phone and your PC both have InfraRed, then you can transfer files via InfraRed. This is very useful option if you are suing Windows XP.
JAD (Java Application Decription files) contains the JAR file name and size attributes. From mobile phone, you will make an HTTP request for the JAR file. In response, you will get the JAD file on to your mobile device. Mobile device have AMS (Application Management System) that will read zthe required attributes and will make another HTTP request to the server for the required JAR file. In response, you will get the JAR file on to your mobile device which actually is the MIDlet.
An example JAD file is given below:
Java Code:MIDlet-Name: Show Properties MIDlet MIDlet-Version: 1.0.1 MIDlet-Vendor: My Corporation Inc. MIDlet-Jar-URL: file://showProperties.jar MIDlet-Jar-Size: 1132 MIDlet-1: ShowProps, , showProperties JadFile-Version: 1.5 MIDlet-Data-Size: 500