×
Namespaces

Variants
Actions
Revision as of 08:48, 26 June 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Different Location API methods return different coordinates from NMEA files in the S60 SDKs (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Using NMEA files for simulating movement in S60 3rd and 5th Edition SDKs does not work reliably. These SDKs handle NMEA files in a different way, depending on the method for getting coordinates. In real devices these different methods return similar coordinates correctly.

Article Metadata
Tested with
Devices(s): Emulator
Compatibility
Platform(s): S60 3rd Edition SDK
S60 3rd Edition FP1 SDK
S60 3rd Edition FP2 SDK
S60 5th Edition SDK
Symbian
S60 5th Edition
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Article
Keywords: LocationProvider, getLocation
Created: User:Technical writer 1 (25 Feb 2009)
Last edited: hamishwillee (26 Jun 2013)

Description

There are two ways to get coordinates by using the Location API (JSR-179):

  1. Asking coordinates "manually" by using the LocationProvider.getLocation() method and
  2. Waiting for location update by using LocationListener and its locationUpdated() method. In real devices both ways should return the same values. In the S60 SDKs this is simulated by using NMEA files, which contain the coordinates and other GPS information. If the first method is used for getting the coordinates, the method always returns the first coordinates from the NMEA file (thus not indicating any kind of movement). The second method simulates movement and reads the coordinate values properly from the NMEA file.

How to reproduce

Ask continuously for the location by using the LocationProvider.getLocation() method in a thread as shown in this example: How to implement a compass in Java ME. Follow the coordinate values and note that they do not change.

Solution

Instead of the first way of getting coordinates, use the second one (LocationListener and its locationUpdated() method). This problem can also be avoided by using real devices for testing.

This page was last modified on 26 June 2013, at 08:48.
71 page views in the last 30 days.