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

Posts: 43
Registered: ‎10-03-2008
My Device: Not Specified

Invalid Locations problem with JSR179 LocationListener on Sprint

Working on a blackberry GPS application, using a LocationListener to get fixes every 10 seconds (in order to keep the GPS chip hot). What I'm experiencing with Sprint is that the initial fix comes in fine, and then I get continuous Invalid Locations. After 5 minutes of invalid locations, I reset the GPS and once again get a valid location followed by all invalid. This is obviously not acceptable when we need to get a fix every 10 seconds or so. I can run the same app on GSM BBs and it works fine, it's only on Sprint (haven't tried other CDMA networks) that it's having this issue.

Here are the settings I'm using (for autonomous mode, no PDE required):

Criteria criteria = new Criteria();
LocationProvier lp = LocationProvider.getInstance(criteria);
lp.setLocationListener(new LocationListenerImpl(), 10, 5, 10);

I'm wondering what the recommeded settings are for the interval, maxage and timeout in the setLocationListener call, as we seem to get varying results (although still not working as expected) with smaller values. For example, using 3,1,1 it seems to get invalid fixes most of the time. If anyone can provide any pointers, it would be much appreciated.
BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Invalid Locations problem with JSR179 LocationListener on Sprint

Please have a look at this post for more information on interval, timeout and maxAge.



Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.