BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   Read GPS TimeStamp (

narasinga 04-17-2012 06:33 AM

Read GPS TimeStamp
Hi Friends,

I am developing GPS Application and i need a small help. I am reading GPS Data using location.isvalid() function, with in this function i need to get the time stamp value of that packet (In GPS Packet timestamp).

Always i m getting only mobile time.

How can i get the GPS Timestamp value.

Dougsg38p 04-17-2012 08:04 AM

Re: Read GPS TimeStamp
AFAIK, Location.getTimeStamp() is the only way to retrieve the time of the GPS fix.

Why does this not work for you?

narasinga 04-17-2012 08:07 AM

Re: Read GPS TimeStamp

when i use location.gettimestamp() i am getting the time but the time is current system time (mobile time)
ex: if actual time is 6:00 Am then if i change the actual time to 9:00 PM then when i receive the location the time which i receiving is 9:00 PM only instead of 6:00AM that is my problem.

hrbuckley 04-17-2012 08:25 AM

Re: Read GPS TimeStamp
That is as per the API documentation. If you want to get the time from the GPS data stream you will have to use the getExtraInfo() method to retrieve the NMEA formatted data.

narasinga 04-17-2012 09:21 AM

Re: Read GPS TimeStamp
ok i will try and give the result info..

narasinga 04-18-2012 06:22 AM

Re: Read GPS TimeStamp
1 Attachment(s)

I have tried that solution which you provided "location.getExtraInfo ("application/X-jsr179-location-nmea");" and i m getting the time value at that time.

I have changed the actual time(16:13 to 20:13) and i have observed the received data here i m failed.

ex: please check the attached document for this result..

i have just used the extrainfo() and got the time value from 16:00 to 16:12 and i have changed mobile time to 20:13 (which indicates red color font in attached doc) and then i got time information as 20:13, 20:14 .. 20:32 etc. instead of getting 16:13,16:14..

this is my problem..
please help me here..

hrbuckley 04-18-2012 06:38 AM

Re: Read GPS TimeStamp
Sorry, I'm not downloading a MS Word file from the internet.

narasinga 04-18-2012 06:44 AM

Re: Read GPS TimeStamp
1 Attachment(s)
check this image..

hrbuckley 04-19-2012 04:54 AM

Re: Read GPS TimeStamp
It appears that you are expecting the time of the fix to be derived from the GPS data. This is not an unreasonable expectation and most commercial GPS devices do this. I have not been able to locate anything specification for either the BlackBerry or NMEA that specifies this as required. BlackBerry smartphones are able to synchronize time with the cellphone network which, if proprly maintained, would be much more accurate than obtaining the time from a GPS chip that is not designed to provide time synchronization. If your requirement is to synchronized time with the GPS system then you should be looking at devices that are certified for that function.

narasinga 04-19-2012 07:41 AM

Re: Read GPS TimeStamp
how do i get that certified funcation?
as you said mobile will sync. with mobile network. Some times some of our organization mobiles are unable to sync. with network time. (it reflects the actual time in mobile i.e if current time is 5.30pm in mobile it shows 1.56 pm) .

so based on above results i have to implement the time with gps sync.

plz help here..

hrbuckley 04-19-2012 05:04 PM

Re: Read GPS TimeStamp
That is just it, given what you have shown us you aren't going to get time from the GPS system.

Are you sure all your devices are set to get time from the network? If your users use the Desktop Manager are they syncing the time when the connect to the PC? Are their PC clocks accurate?

narasinga 04-28-2012 06:49 AM

Re: Read GPS TimeStamp

when i use only network selection for getting times i have failed. some times our persons will move to remote areas regularly so i cannot do this.

So is there any sugissions regarding this issues.

yegane 05-29-2012 11:34 PM

Re: Read GPS TimeStamp
thanks for the info, I will try it

All times are GMT -5. The time now is 05:32 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.