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
New Developer
criccomini
Posts: 26
Registered: ‎12-03-2008
My Device: Not Specified

Re: BB Storm GPS

OK.. More updates:

 

I sat with my phone tonight for two hours and tried every conceivable permutation of Criteria and LocationProvider that I could. Here are some things I've learned:

 

- If you set power consumption to POWER_USAGE_HIGH (THE DEFAULT!!), you will immediately get a providerStateChanged with newState as TEMPORARILY_UNAVAILABLE. All subsequent location updates will be invalid.

 

- If you set POWER_USAGE_LOW, you will no longer get the immediate TEMPORARILY_UNAVAILABLE state change. All of your location updates will still be invalid, but the state never changes (as it does with POWER_USAGE_HIGH).

 

- Default criteria does not work (WTF!!) because of item one in this list. No combination of vert/horiz accuracy/cost combinations made a difference. It always gave TEMPORARILY_UNAVAILABLE immediately on start.

 

So.. I am pretty exasperated. This is pretty much ridiculous. The documentation on this is abismal. ALL I WANT TO DO  IS GET GPS WORKING ON A BLACK BERRY STORM WITH VERIZON WIRELESS. Please tell me what I'm doing wrong.

 

Here is my current criteria:

 

                Criteria criteria = new Criteria();
               
                criteria.setHorizontalAccuracy(1000);
                criteria.setVerticalAccuracy(1000);
                criteria.setCostAllowed(true);
             
                criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
               
                LocationProvider.getInstance(criteria).setLocationListener(new MyLocationListener(), 10, -1, -1);
 

I should note that an unlocked android phone is on the way, and my app is set to run on notification events when they get pushed in the firmware. Blackberry is the only one with these riduculous problems!

 

Please help!

BlackBerry/Mobile Enthusiast - http://www.riccomini.name
Please use plain text.
New Developer
asmq
Posts: 13
Registered: ‎12-10-2008
My Device: Not Specified

Re: BB Storm GPS

GPS needs lots of power, hence POWER_USAGE_LOW disables it.

 

Have you tried just

 

Criteria c = new Criteria();

c.setCostAllowed(false);

 

This should result in an autonomous GPS fix.

Please use plain text.
New Developer
criccomini
Posts: 26
Registered: ‎12-03-2008
My Device: Not Specified

Re: BB Storm GPS

If I set the power setting to high, I immediately get a temporarily unavailable state when the app starts. The app then returns invalid locations indefinitely.

 

If I set the power to low, it doesn't seem to disable it (unless it's doing that without changing the state)... I still get the invalid locations, as I mentioned above, but the state never changes.

BlackBerry/Mobile Enthusiast - http://www.riccomini.name
Please use plain text.
New Developer
rcampbel
Posts: 7
Registered: ‎12-14-2008
My Device: Not Specified

Re: BB Storm GPS

So, I'm still waiting for my signing keys to get past the GPS Not Allowed error, but it does appear that the GPS isn't totally unlocked with Verizon. Is there a link/contact, etc. at Verizon to apply for the keys to fully unlock the LocationProvider class? The DB00591 knowledge base article just provides a link to the Verizon ZON program with no specific information that I can find.

 

Randall

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: BB Storm GPS

There is a link on the ZON page to sign up as a "Verizon Developer".

 

 

 

Please use plain text.
Developer
haagmm
Posts: 178
Registered: ‎07-29-2008
My Device: Not Specified

Re: BB Storm GPS


asmq wrote:

GPS needs lots of power, hence POWER_USAGE_LOW disables it.

 

Have you tried just

 

Criteria c = new Criteria();

c.setCostAllowed(false);

 

This should result in an autonomous GPS fix.


That criteria was discussed to be a non starter.  I belive "Low Power" is for Cell Site location and not gps.

Please use plain text.
Developer
idonen
Posts: 43
Registered: ‎10-03-2008
My Device: Not Specified

Re: BB Storm GPS

Ok guys, this is what I'm using, and it is currently working fine on a Storm on Verizon:

 

criteria.setCostAllowed(false);
criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_MEDIUM);
criteria.setPreferredResponseTime(16);
criteria.setHorizontalAccuracy(100);

lp = LocationProvider.getInstance( criteria );               

lp.setLocationListener(new LocationListenerImpl(), 2, -1, -1 );


From previous playing around with CDMA providers (Sprint and Verizon), it can be very tricky getting the right combination. Even the interval, timeout and maxage in the setLocationListener call is difficult to get right, because often values you think would work don't. For example,  in theory to keep the GPS hot you should be able to use any interval less than 10, but in our experimenting, anything more than 2 was returning very inconsistent results. I've never tried using longer intervals, since we need to keep the chip active for our application. 

Please use plain text.
Developer
haagmm
Posts: 178
Registered: ‎07-29-2008
My Device: Not Specified

Re: BB Storm GPS

thanks a ton man.  I'm sure you have made alot of people here happy :smileyhappy:
Please use plain text.
New Developer
criccomini
Posts: 26
Registered: ‎12-03-2008
My Device: Not Specified

Re: BB Storm GPS

I don't have access to my phone. haagm.. can you verify that this works? :smileyhappy:
BlackBerry/Mobile Enthusiast - http://www.riccomini.name
Please use plain text.
Developer
haagmm
Posts: 178
Registered: ‎07-29-2008
My Device: Not Specified

Re: BB Storm GPS

my storm is a voda model.  The vzn one is supost to be in next week ... Also, working from home today.
Please use plain text.