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: 68
Registered: ‎10-26-2008
My Device: Not Specified

getLocation() does not throw Exception

[ Edited ]

Hi,

 

I would like to get confirmation of an issue I'm seeing on a BlackBerry Bold device. I have written code to get the GPS location and set a timeout value of 30 seconds. The call to LocationProvider.getLocation(30) does not return in 30 seconds and no exception is thrown (according to API documentation, LocationException should be thrown) - as a matter of fact, if no reception is found, the call will hang forever.

 

Can anyone else confirm this? Is there a way to simulate no GPS reception on the simulator?

 

Sorry, forgot to include device info: BlackBerry Bold (9000), Rogers Wireless, software verions 4.6.0.164.

Message Edited by MRJAVA on 04-15-2009 08:45 PM
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: getLocation() does not throw Exception

Might try this later on my Bold, however 30 seconds does seem to short for a first fix.  I would suggest 3 minutes.
Developer
Posts: 68
Registered: ‎10-26-2008
My Device: Not Specified

Re: getLocation() does not throw Exception

Sure, maybe it is too short, but I would still like to see an Exception. That's what the API docs say should happen, and that's what I expect would happen.  I don't like calls that just hang until they can return...
Developer
Posts: 105
Registered: ‎07-24-2008
My Device: Not Specified

Re: getLocation() does not throw Exception

did you see expection? i have same issue.