Mobile Phone Development

Colin P. Fahey


<<< BACK TO MOBILE DEVELOPMENT


REFERENCES AND RESOURCES

[B] Motorola J2ME™ 3.0 SDK

Motorola has an SDK that includes an emulator capable of emulating many Motorola phones, including the T720. You can get this SDK for free, and you do NOT need CodeWarrior to use the phone emulator included with the SDK, despite all the mention of CodeWarrior on the Motorola web site. Also, in general I think you can get by without CodeWarrior or Motorola's SDK even if you are doing professional development for the T720 -- but don't sue me if I'm wrong! NOTE: You must register with Motorola to even learn about their J2ME SDK, let alone download it. http://kb.motorola.metrowerks.com/motorola/developmentTools.do There are some functions for playing "Compact MIDI" and even "*.WAV" files. Don't ask me about the details. Just install and read the documentation. Here's a comment I received in an e-mail:

The Motorola J2ME SDK gives you (among other things) "skins" for the emulator so that the emulator will look like the phone you're programming for. It's more than cosmetic. Screen size can vary for example, so if you're designing something where screen size matters, it definitely helps to have an emulator that matches the target. The SDK also includes some Motorola-created open Java classes called the Lightweight Windowing Toolkit that give you some of what you need to create an application with a real UI - various UI widgets. You can get by without it, but if you were doing serious work you'd probably want to have it. If I was creating stuff for Sony Ericsson or Nokia or any other phone, I'd want their SDKs too.

Here's a quote from Motorola's web site regarding their SDK:

The Motorola Software Development Kit (SDK) for the J2ME™ platform is a tool used for developing and testing programs written in the Java programming language. The SDK includes applications that make it easy to launch MIDlets (J2ME™ Programs) using the Motorola J2ME™ device emulator. Together these tools allow you to develop and debug your J2ME™ programs in emulation before downloading them to a target device. The Motorola SDK can be integrated into Metrowerks' CodeWarrior™ Wireless Studio, Professional Edition, Version 7. This version of the SDK includes numerous enhancements for performance and stability. All of the functionality of the previous version is supported, with these new features: New handsets supported by this version: A830 New functionality supported by this version: A830 - Gaming API, Serial Port Connectivity, HTTPS protocol support. All devices - Improved graphics performance The SDK supports the following devices: *Motorola Accompli (008/6288 and 388)™ *Motorola T280i *Motorola T720 *Motorola v60i *Motorola v66i *Motorola iDEN i1000 *Motorola iDEN Platform *Motorola StarTAC™ *Motorola i85s

[B] Sun ONE Studio 4 update 1, Mobile Edition

A friend of mine apparently had no problem downloading and using this toolkit -- which apparently gives you everything you need (JDK, MIDP, CLDC) and extra tools to make the JAD, etc. I haven't tried it myself. Here are other comments on this toolkit: Quote from a Slashdot posting:

You could have saved yourself some hassle installing all the different toolkits. Just download [sun.com] Sun ONE Studio 4 update 1, Mobile Edition, its completely free (as in beer), and is a great integrated development environment (about 20MB download). All the tools, emulators and demos from the article are bundled. Since last week I'm running it under RH Linux 7.2, with 512mb of ram (YOU NEED LOTS OF RAM!!!). Took just one minute [sun.com] from skipping the regestration screen to stepping through the worm game in the debugger (I always love the game worm/snake/nibbles in all its incarnations, and the demo version provided is beautifully programmed - simple but object-oriented and multi-threaded in a tiny amount of code). You need to register to download. Supported platforms: Linux, Windows, Solaris.

Quote from a Slashdot posting:

From the sun download faq [sun.com]: "Because of the way our download service handles session management, you cannot resume partial downloads by clicking on the link again in the browser window. Rather, open the download manager program you are using, and resume the download from within the download manager itself. We continue working with our engineers to enable support for more download managers on more platforms. For now, however, please turn off any other download managers and utilities if you are having download problems." Downloading big files from sun under linux has been really difficult for about a year now. The only download manager until recently i had been able to get to work was DAP under windows (warning: Spyware). Basically most download managers (prozgui, getright, opera) won't be able to deal with Sun's [insincerity]. Ludicrously rather than fix their website to just work, Sun have written their own download manager [sun.com]. Its written in java, and its only tiny 140KB! The surprising thing is that this is a really excellent download manager , tiny footprint, no browser hijacking, no adware/spyware, works under any OS, automatic file verification, automatic unzips, and solid as a rock

[C] Random forum posting:

The Jad and Jar files are the only files needed to run an application on a phone and, depending on the phone and the method you are transferring the app to the phone, you may only need the jar. If the applications are to be sent Over the Air (OTA), i.e. via a web URL, you will need to create a link on a page readable by the phone (e.g. wml, cHtml, cHtml) to the JAD file. For OTA downloads you will also need to set up your web server to handle jar and jad file types. In apache you need to add the following lines to the httpd.conf file: AddType text/vnd.sun.j2me.app-descriptor jad AddType application/java-archive jar Also, you will need to make sure that the URL for the jar file is the URL for the JAR file on the server, not the local URL If on the other hand you want to transfer via IR, Bluetooth or a Cable you just need to transfer the files to the phone, install and run. The JAD file is generally used specifically to provide the phone information needed for OTA downloads and as such, the Nokia 7650 and some other models you only need to transfer the jar file for non-OTA transfers.

[D] http://wireless.java.sun.com/midp/questions/sar/ :

SAR (or WTP-SAR) stands for Segmentation and Reassembly. It's an optional feature of the Wireless Transaction Protocol (WTP) within WAP. SAR defines a method for a WAP gateway to break a large message (a JAR file you're downloading, for instance) into small chunks (the segmentation) and for the phone to piece it back together (the reassembly). Not all phones use SAR, but most will access web servers through a WAP gateway. Nokia uses SAR, while Motorola uses features of HTTP 1.1 to retrieve small chunks of a file one at a time and then reassemble it. One problem that arises with WAP gateways concerns MIME types returned by the web server. If a user requests a JAD or JAR file and the server returns the wrong MIME type, the gateway and subsequently the phone will handle the transfer incorrectly. To ensure proper downloading of MIDlets, use the following MIME types: text/vnd.sun.j2me.app-descriptor jad application/java-archive jar

[E] Random forum posting:

you have to have correct MIME settings on the server that stores .JAD/.JAR files. After that you'll be able to download apps to your device. Please keep in mind that: - this process is rather device specific (not necessarily using WA protocol) - you'd better have absolute paths to .JAD and .JAR set (i.e. http://www.fooserver.com/repository/JoeDoeApp.JAD)

[F] Random forum posting:

At least in the Siemens devices, you have a specific configuration for Java, which is different from that of WAP and GPRS. You may navigate through WAP, but when a midlet is found, a different setup is automatically changed to accomplish the download. In the M50 handy, you have to set the Java profiles according to the parameters of your provider; in the c55 handy, the same set is called "HTTP profile" and it is used also for other kinds of download (e.g., http connections in the midlet).

[G] Misc. Interesting link on advanced midlet signing stuff:

http://wirelesssoftware.info/midp_2.0/ javax/microedition/midlet/doc-files/PKIAppendix.html

[H] Very cool midlet programming introduction:

http://wireless.java.sun.com/midp/articles/getstart

[I] http://wireless.java.sun.com/midp/articles/deploy/

To deploy your wireless applications remotely: Upload your application files (JAD and JAR) to a remote web server. If your project is named games, for instance, upload the files: games.jad and games.jar from the bin directory of your project home (for example, /apps/games/bin). Note that the two files must end up in the same directory on the server. Reconfigure the web server so that it recognizes JAD and JAR files: For the JAD file type, set the file extension to .jad and the MIME type to text/vnd.sun.j2me.app-descriptor. For the JAR file type, set the file extension to .jar and the MIME type to application/java-archive. How you configure the web server depends on which one you're using. For example, if you're using Tomcat, make sure your web.xml file includes the following lines: jad text/vnd.sun.j2me.app-descriptor jar application/java-archive Change your JAD file's MIDlet-Jar-URL property to specify the URL of your JAR file. For example, in the copy of games.jad you uploaded to the server, change... MIDlet-Jar-URL: games.jar ...to... MIDlet-Jar-URL: http://YourWebServerAddress:port/pathTo/games.jar

[J] RANDOM LINKS:

http://www.microjava.com/articles/techtalk/midp?PageNo=3 http://www.corej2me.com/DeveloperResources/sourcecode/general/multipleMIDlets/index.shtml

[K] NOKIA J2ME PHONE LINKS:

From a Nokia site:

"Nokia's J2ME implementation consists of the industry standard MIDP 1.0 and CLDC 1.0. The platform is extended by the Nokia User Interface (UI) API. It gives application developers access to certain basic phone functionality that is not specified by CLDC 1.0 or MIDP 1.0. The Nokia UI API provides access to simple audio capabilities, vibration, display lighting, as well as some graphics-related enhancements."

From an e-mail I received:

So Nokia seems to be really opening up it's phones to any kind of custom modification you can think of. You could add vibration to java games, add cartoon bubbles to pictures you take, and indeed upload pics to your site! You could write your own server, and people could upload stuff to you! Here are some cool 7650 links: DOOM on the 7650!!: http://www.wildpalm.co.uk/Doom7650.html The 7650 page: http://www.nokia.com/nokia/0,1522,,00.html?orig=/phones/7650/index.html Nokia J2ME FAQ: http://www.nokia.com/nokia/0,5184,2776,00.html Download sdks, j2me tutorials, and more: http://www.forum.nokia.com

[K] PHONE APP LINKS:

[1] http://midlet.org [2] http://spruce.jp/freemidlets [3] http://www.gameloft.com [4] http://www.microjava.com KaZaa has 2500 free ring tones.


<<< BACK TO MOBILE DEVELOPMENT



CONTACT INFORMATION

Colin P. Fahey cpfahey@earthlink.net

http://www.colinfahey.com