Archived:Location.getCourse() and Location.getSpeed() not working in S60 3rd FP1 Emulator (Known Issue)
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot change of template (Template:KnowledgeBase) - now using Template:ArticleMetaData) |
hamishwillee
(Talk | contribs) m (Hamishwillee -) |
||
| (3 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | [[Category:S60 3rd Edition | + | [[Category:S60 3rd Edition FP1]][[Category:Known Issue]][[Category:Java ME]][[Category:Code Snippet]][[Category:S60 3rd Edition FP1]][[Category:Bluetooth API (JSR-82)]][[Category:Emulator]][[Category:Symbian]] |
| − | + | {{ArticleMetaData <!-- v1.2 --> | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | |sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | ||
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| − | |sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | + | |devices= Emulator |
| − | |devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) --> | + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> |
| − | |signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | + | |platform= S60 3rd Edition, FP1 |
| − | |capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) --> | + | |devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) --> |
| − | |author=[[User:Schoenke]] | + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> |
| + | |signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= Location getCourse() getSpeed() | ||
| + | |language= <!-- Language category code for non-English topics - e.g. Lang-Chinese --> | ||
| + | |translated-by= <!-- [[User:XXXX]] --> | ||
| + | |translated-from-title= <!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by= <!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp= <!-- After re-review: YYYYMMDD --> | ||
| + | |update-by= <!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate= 20090503 | ||
| + | |author= [[User:Schoenke]] | ||
}} | }} | ||
==Description== | ==Description== | ||
| − | To get a LocationProvider that provides current speed and course, the criteria have to be set accordingly before retrieving the instance of LocationProvider: | + | To get a {{Icode|LocationProvider}} that provides current speed and course, the criteria have to be set accordingly before retrieving the instance of {{Icode|LocationProvider}}: |
<code java> | <code java> | ||
| Line 28: | Line 32: | ||
</code> | </code> | ||
| − | This works fine for S60 3rd FP1 devices. But if the | + | This works fine for S60 3rd FP1 devices. But if the {{Icode|setSpeedAndCourseRequired}} criterion is set in the emulator, the call of {{Icode|getInstance()}} always returns {{Icode|null}}. |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | The purpose of an emulator is voided if it doesn't behave like the devices it represents. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
Revision as of 02:45, 5 November 2012
Article Metadata
Tested with
Devices(s): Emulator
Compatibility
Platform(s): S60 3rd Edition, FP1
Article
Keywords: Location getCourse() getSpeed()
Created: schoenke
(03 May 2009)
Last edited: hamishwillee
(05 Nov 2012)
Description
To get a LocationProvider that provides current speed and course, the criteria have to be set accordingly before retrieving the instance of LocationProvider:
Criteria criteria = new Criteria();
criteria.setSpeedAndCourseRequired(true);
LocationProvider locationProvider = LocationProvider.getInstance(criteria);
This works fine for S60 3rd FP1 devices. But if the setSpeedAndCourseRequired criterion is set in the emulator, the call of getInstance() always returns null.
The purpose of an emulator is voided if it doesn't behave like the devices it represents.

