2

I am new in J2ME app development field. I am developing GPS based app using Nokia Maps for series 40 mobiles. I want such emulator which provide GPS(to retrieve & set current coordinates & many other purposes). I search a lot on google but I didn't found such emulator.... even what ever emulators provide by Nokia SDKs; they also don't have GPS capability... Then how should I get such emulator??

Prof. Falken
  • 24,226
  • 19
  • 100
  • 173
Rahul More
  • 615
  • 3
  • 13
  • 41

1 Answers1

2

You can download the latest Nokia IDE (which includes the Nokia Maps Plugin) here: Emulator download

The emulator associated with the SDK includes tools to simulate JSR-179 location calls (e.g. Cell-Id/GPS), you can play back coordinates for a saved file and receive them at regular intervals. Look at the emulator's Tools > Route Editor menu.

The confusion here is the difference between GPS positioning and Cell-Id positioning. There are currently no series 40 mobiles (that I know of) with a GPS unit - hence positioning will need to be done by Cell-ID - In this case the only way to retrieve frequent location updates in the Cell-ID scenario is to call the getLocation() method within a repeating loop. Retrieving location objects via the locationUpdated() method, can only be done in a GPS-based location retrieval.

In summary you can get a location from any Java ME phone supporting JSR-179, you won't be using GPS though.

To get a location use the following:

 cellIdLocator = getCellIdProvider();
 cellIdLocator.getLocation(DEFAULT_TIMEOUT);

Where the cell-id provider can be held in a singleton

private LocationProvider cellIdLocator;

public LocationProvider getCellIdProvider() throws LocationException {
            if (cellIdLocator == null) {
                int[] methods = {
                    Location.MTA_ASSISTED | Location.MTE_CELLID
                            | Location.MTY_NETWORKBASED};

                cellIdLocator = LocationUtil.getLocationProvider(methods, null);
            }
            return cellIdLocator;
        }
Jason Fox
  • 5,115
  • 1
  • 15
  • 34
  • But Somewhere I read that CellID always doesn't give you correct position.... How much is this true??? – Rahul More Jan 22 '13 at 06:49
  • Cell-ID could give you an accuracy up to 100m (Urban Areas) it is less accurate in Rural Areas see: - http://www.developer.nokia.com/Community/Wiki/Determining_Current_Location_via_Cell_ID and http://cens.ucla.edu/~mhr/cs219/location/trevisani04.pdf - this was a case study in 2004, accuracy is likely to have improved since then. Besides which you haven't got much of a choice - if the phone doesn't have a GPS unit, you will have to use Cell-ID – Jason Fox Jan 22 '13 at 08:14