User loginSearchNavigationActive forum topics |
How To Get StartedYou can create your own Java applications for Sprint PCS handsets. The process is kind of involved, but writing the programs themselves isn't too difficult. This article introduces you to the tools you'll need. Virtual MachinesJava programs run on a Java Virtual Machine (JVM). Thoeretically, any computer or cell phone that can run a JVM can run any Java program. This leads to the common "Write once, run anywhere" slogan that Sun likes to recite. You may want to read more about JVM's. Cross DevelopmentRather than write programs on your phone, you will want to write programs on your home computer and then download them to your phone. This is called Cross Platform Development. It's much easier to write and test software on a powerful PC then to use a cell phone. The cell phone just needs to run the program. You may or may not already have a JVM on your computer. If you have never installed Sun's JVM or if you aren't sure, then you should install the J2SE Virtual Machine. J2SE Virtual MachineJava 2 Standard Edition is the name given to the Virtual Machine that runs on home computers. It is by far the most widely used JVM, hence the name "Standard" I guess. As of this writing, the latest version available for Windows is J2SE 1.4.2. Sun offers J2SE Runtime Environments (JRE) and Software Development Kits (SDK). Both packages include the JVM that we want, however we won't need the full SDK since we aren't writing J2SE applications. You only need to download the JRE. Download the J2SE Java Runtime Environment from Sun J2ME Virtual MachineJava 2 Micro Edition is the JVM in your cell phone. As the name "Micro" implies, it's a smaller version of J2SE. Not surprisingly, it has greatly reduced functionality as well. Most of the Sprint PCS Vision handsets come with the JRE built-in. Oddly enough, the exceptions are the PDA phones. If you have a Palm OS based phone, you will need to download and install Sun's JVM. I may devote a future article to Palm development, but in the mean time, you should read more about Java for Palms. If you have a Pocket PC phone, well, you are out of luck. I don't know of any freely available Java Virtual Machine for Pocket PCs. These phones simply will not run J2ME applications. J2ME Development KitWhile you already have the Runtime Environment in your phone, you don't have the J2ME Software Development Kit on your computer. You will want to install Sprint's version of the SDK which is freely available. Install the Sprint Development Kit Sprint wants you to create a developer account before you can download anything from their site. The developer accounts are free. Make up a username and password to access the downloads section. Once you have logged in, proceed to "Downloads" then look for the "Wireless Java" option along the left side. From there look for the "Download Sprint Wireless Toolkit for Java version 1.0.3 here" link. DemosIf you go along with all the default installation options on a Windows computer, you'll find a couple new options on your Start menu. Under Programs the "Java 2 Runtime Environment" will appear with a single option to view the "Welcome to Java" message. After you've read the message you can delete the Java 2 Runtime Environment menu option altogether. It doesn't really do anything other than inform you that the JVM is available. "Sprint PCS Java Wireless Toolkit 1.0.3_01" also appears on the Programs menu. Look for the KToolbar option on that menu and launch it. It may take a few seconds to startup, but you should see the Sprint PCS Wireless Toolkit window pop-up. Select the "Open Project..." button and you'll see that the toolkit has been installed with several demonstration applications. Very nice of them, don't you think? Choose a project like "games" and open it. Now select the SprintLargeColorPhone device from the drop down menu then press the "Run" button. Some messages will flash by in the Toolkit window and an image of a phone will appear. You can use the mouse to simulate key presses on the phone. The phone is also mapped to the keyboard. The phone will show a menu of available applications just like your real cell phone does. You can select one and press "OK" to launch a game. I like PushPuzzle myself. ProvisioningGreat, so you can simulate a phone and run applications on your computer. How do you get them on to your phone? That's the point, right? Unfortunately, things get kind of tough here. The process of making an application available for download and then installing it on to a real phone is typically called "provisioning." No, it doesn't have anything to do with "Vision" phones. PackagingFirst, you need to package your application for provisioning. From KToolbar, look under the Project menu and select the "Package" option. KToolbar should report that two files were created like this: Building "games" Wrote c://SprintPcsWTK/apps/games/bin/games.jar Wrote c://SprintPcsWTK/apps/games/bin/games.jad Build complete If you look in that directory, you will find the games.jar and the games.jad file. All you need to do is get those files on to your cell phone. Unfortunately, this is where things get kind of hard. You need to put these files on a web server somewhere that you can reach using the web browser on your phone. No, there is no way to install the applications directly from your computer using a cable to your phone (unless you have a Palm OS phone). You have to use a web server. Uploader Tool and Application HostingYou can use the Sprint Developers' Uploader tool to transfer your JAR file to your phone. The Uploader is at http://uploader.sprintdevelopers.com. Just enter your phone number and upload your JAR file. The Uploader will send a text message to your phone with a link to your JAR. From there you can download and install the program on your handset. To mass distribute your program to lots of users, you'll need to set up a permanent host for your JAR. I plan to offer hosting services through apgap.com for SprintDevelopers.com users. In the mean time, if you have something you really want hosted immediately, write to me using the feedback form.
|