Archived:Location.getCourse() and Location.getSpeed() not working in S60 3rd FP1 Emulator (Known Issue)
hamishwillee
(Talk | contribs) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Add Abstract. Tidy wiki text.) |
||
| Line 1: | Line 1: | ||
| − | [[Category:S60 3rd Edition FP1]]{{ArticleMetaData <!-- v1.2 --> | + | [[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]] |
| + | {{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]]) --> | ||
| Line 20: | Line 21: | ||
|creationdate= 20090503 | |creationdate= 20090503 | ||
|author= [[User:Schoenke]] | |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 34: | 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. | + | The purpose of an emulator is voided if it doesn't behave like the devices it represents. |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
Revision as of 07:32, 12 March 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
(12 Mar 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.

