Open topic with navigation
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
-
Download Samples_gps.zip.
- Unzip Samples_gps.zip.
- Open iDEN SDK for J2ME (MIDP 2_0).
- Choose File > New Project.
- Specify a Project name, for example, GPS.
- Specify the project folder to src folder under
the extracted samples folder, for example, C:\Samples_gps\src.
- Specify the Midlet Class name as:
com.esri.mkit.samples.gps.GPSMidlet
- Click Next. Step 2 of the wizard displays.
- Click Next.
- Click Finish.
- Right-click the java files folder and click Add
Dir.
- Select the com directory located inside the src
directory of the extracted Samples folder, for example, C:\Samples_gps\src\com.
- Right-click Java Files and select Add.
- Select MapCanvas.Java located in the Src directory
of the extracted Samples folder, for example, C:\Samples_gps\src, and
click Open_File.
-
Download the ArcWeb
J2ME Mobile Toolkit.
- 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\.
- Type
jar -xf mkit-<version>.jar
and press Enter.
- Two directories are created in the same location
as the jar file, for example, C:\Samples_gps\: com and META-INF.
- 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\.
- From iDen SDK, open GPSMidlet.java.
- Set the user and pwd variables in GPSMidlet.java:
public String user = ""; //ArcWeb username
public String pwd = ""; //ArcWeb
Password
- Click Save.
- From the iDEN SDK, select Project > Build.
A JAR file is created.
- 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