You are here: Using J2ME Mobile Toolkit > Samples > GPS sample set up for Nextel phones

S A M P L E S

GPS sample set up for Nextel phones

The purpose of the GPS sample is to demonstrate how to develop ArcWeb J2ME Mobile Toolkit applications for ArcWeb Services for Nextel GPS phones. The GPS sample contains one code download for use with the ArcWeb J2ME Mobile Toolkit.

The ZIP file contains the project files you need to create the client sample. The set up instructions cover how to deploy the sample in a Motorola emulator.

These instructions assume you have iDEN SDK for MIDP 2.0 running on your machine and an active subscription to ArcWeb Services. It also assumes you have a program to unzip the sample code.

For more information on getting started with ArcWeb Services, see Getting started with ArcWeb Services.

How to use

  1. Download Samples_gps.zip.
  2. Unzip Samples_gps.zip.
  3. Open iDEN SDK for J2ME (MIDP 2_0).
  4. Choose File > New Project.
  5. Specify a Project name, for example, GPS.
  6. Specify the project folder to src folder under the extracted samples folder, for example, C:\Samples_gps\src.
  7. Specify the Midlet Class name as:
  8. com.esri.mkit.samples.gps.GPSMidlet

  9. Click Next. Step 2 of the wizard displays.
  10. Click Next.
  11. Click Finish.
  12. Right-click the java files folder and click Add Dir.
  13. Select the com directory located inside the src directory of the extracted Samples folder, for example, C:\Samples_gps\src\com.
  14. Right-click Java Files and select Add.
  15. Select MapCanvas.Java located in the Src directory of the extracted Samples folder, for example, C:\Samples_gps\src, and click Open_File.
  16. Download the ArcWeb J2ME Mobile Toolkit.
  17. To unjar the ArcWeb J2ME Mobile Toolkit, open a Command Prompt and CD to the directory containing the ArcWeb J2ME Mobile Toolkit, for example, CD C:\Samples_gps\.
  18. Type
  19. jar -xf mkit-<version>.jar

    and press Enter.

  20. Two directories are created in the same location as the jar file, for example, C:\Samples_gps\: com and META-INF.
  21. Copy the com and META-INF directories and their contents to the npclass folder located under src folder of the extracted Samples folder, for example, C:\Samples_gps\src\.
  22. From iDen SDK, open GPSMidlet.java.
  23. Set the user and pwd variables in GPSMidlet.java:
  24. public String user = ""; //ArcWeb username

    public String pwd = "";  //ArcWeb Password

  25. Click Save.
  26. From the iDEN SDK, select Project > Build. A JAR file is created.
  27. Select Project > Execute to run the sample application in the Motorola Emulator.

Visit the Feedback page to give comments or suggestions about the ArcWeb Developer's Guide.

ArcWeb site | ArcWeb support | support.esri.com

Copyright © ESRI