Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 117
Registered: ‎07-16-2008
My Device: Not Specified

Re: Emailing GPS Info from BlackBerry curve8310 using Java

Just a quick note regarding this:

"Yes getlocation(60) seconds worked with sleep timer of 65 seconds. I recon that in the code by canamgroup the (sleep time) < (getlocation) which probably made it go to sleep before it could send an email."
 
I don't understand why?

Unless I'm mistaken, (sleep time) CAN be lower than (getLocation timeout).
I actually think it doesn't matter at all.
 
For what I understand, the getLocation timeout will wait for 60 seconds before throwing an exception. While it's waiting, I don't think the remaining code is executed.
 
In my tests, I have used getLocation(60) combined with a sleep time of 5 seconds... and it has always worked (when the Blackberry was outside).  And I do believe it took more than 5 seconds to obtain GPS coordinates.
 
I'll do some tests... and I'll keep you posted.  Unfortunately, I don't have any "real" Blackberry to test on right now.

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Emailing GPS Info from BlackBerry curve8310 using Java

I won't worry about doing any tests, I think your comments are correct - the sleep time and the getLocation wait time are not related. 
New Developer
Posts: 23
Registered: ‎07-28-2008
My Device: Not Specified

Re: Emailing GPS Info from BlackBerry curve8310 using Java

Hi there

 

Can anyone please advise on what I can do to avoid this error below. This application compiled with no errors before.

 

Building thesleepingbeast
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\rapc.exe  -quiet import=..\..\lib\net_rim_api.jar codename=thesleepingbeast thesleepingbeast.rapc warnkey=0x52424200;0x52525400;0x52435200 "C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\Test Projects\'us' BB Tracking\img\uslogo_jde.png" "C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\Test Projects\'us' BB Tracking\postGPS.java"
Error while building project

 

Thanks in advance

 

Regards 

 

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Emailing GPS Info from BlackBerry curve8310 using Java

Is that all you get, no errors or anything?
New Developer
Posts: 23
Registered: ‎07-28-2008
My Device: Not Specified

Re: Emailing GPS Info from BlackBerry curve8310 using Java

No errors just this.

 

I am not sure what it could be but I think recently I installed something which updated Java on my PC.

 

Any advise regarding this.

 

Thanks in advance

 

Highlighted
Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Emailing GPS Info from BlackBerry curve8310 using Java

Could be, note the technical requirements listed here:

http://na.blackberry.com/eng/developers/downloads/jde.jsp

 

"java -version" from a command prompt, should tell you the default version you have installed.  However, you can set environment variables in bat files etc, so that you can run two different versions of Java on your PC at the same time.

 

I suggest that you start a separate thread with your problem,  Identify the version of JDE you have and the level of Java.