Archived Talk:GPS API in Symbian 3rd Edition

From Nokia Developer Wiki
Jump to: navigation, search

The example code won't compile because the NewLC method doesn't exist in the class.

---*1 Use NewL instead of NewLC

The zipped source code won't compile because the GetCurrentPositionL method isn't declared in the header file.

---*2 Replace GetCurrentPositionL by FetchCurrentLocationL

ECidWaitNote needs to be defined somewhere to get the code to compile.

---*3 Add this code to your *.hrh file

[code] enum TControlID { ECidWaitNote = 0x6666 }; [/code] note: you can also change the id and define it in your *.hrh file. you can also use another value.


Another error

The .ra file has EAknWaitNoteFlag instead of EAknWaitNoteFlags. Will not compile.

---*4 Copy the content of .ra file to your *.rssi file.

The correct function name for ---*2 is FetchCurrentPostionL // Govind Paul

One more!

After signing the file using a developer certificate and installing on the phone, when I open the application, I get a "System Error!". Any clue why this so?

---*5 The error: "System Error" is obtained because the file where you put the #include *.ra line is incorrect. Don't put this line in any file just do the item 4 with (---*4) mark.

Hope it helps - by joseph.m

Hello, I'm currently testing this example. I've got one question. It seems like it shows the coordinates with a very low precision? I mean it seems to retrive some coordinates but they stay the same when position changes (a change of about 50m) doesn't affect the coordinates. on the other hand the coordinates change in the standard Nokia GPS app (tools). any idea how to change the precision?

PallaviMajgaokar - One more

---6* Before

   TBool result = request->GetCurrentPostionL(latitude, longitude);

you need to push the "request". CleanupStack::PushL( request ); and then TBool result = request->GetCurrentPostionL(latitude, longitude);

But even after doing all these things, I did not get position at all! :(

PallaviMajgaokar 19:54, 28 December 2011 (EET)

Hamishwillee - @PallaviMajgaokar - not correct

  1. How about instead of adding notes here you actually fix the code in the main article?
  2. PallaviMajgaokar - you're incorrect. The request is created using NewLC, so a copy of the object is left on the CleanupStack following construction. You would be correct if the object was created using NewL()
No idea why it doesn't work - assuming you're still using 3rd edition?

hamishwillee 06:24, 3 January 2012 (EET)

PallaviMajgaokar - Hamishwillee

I am still using 3rd edition. My application crashes if I don't write that PopAndDestroy without the PushL. If some one else in the future would have the same error, they would atleast know what the probably solution might be.

PallaviMajgaokar 12:17, 13 January 2012 (EET)

This page was last modified on 21 June 2012, at 09:23.
35 page views in the last 30 days.