BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-27-2009, 10:32 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default GPS location issue

Please Login to Remove!

I am using 9530 device. I want to find location but getLocation method returns null. I set that location object in red (see code below).

What is wrong?

Criteria criteria = new Criteria();
criteria.setHorizontalAccuracy( Criteria.NO_REQUIREMENT );
criteria.setVerticalAccuracy( Criteria.NO_REQUIREMENT );
criteria.setPreferredPowerConsumption( Criteria.POWER_USAGE_MEDIUM );
LocationProvider locationProvider = LocationProvider.getInstance( criteria );
Location location = locationProvider.getLocation( -1 );
Offline  
Old 08-27-2009, 10:47 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Try passing a null Criteria - this will always provide you with the "default" location provider.

And one other caveat - and I mention this only because so many folks do not seem to be aware of it - when using autonomous GPS, you need a clear line of sight to the sky. If you try this inside your office, it simply will not work 90% of this time.

If you are accessing "network assisted" GPS, this will work as long as you have cell coverage. In your example above, you are not going to get assisted mode. I'm guessing that this is your T-Mobile carrier, so assisted mode is not available in any case on this network.
Offline  
Old 08-28-2009, 12:09 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are right, this is T-Mobile provider. How can I get this assisted mode?
Offline  
Old 08-28-2009, 07:27 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

There is no "assisted" on T-Mobile, as I stated above. You'll have to rely on autonomous, which is the default on this device anyway.

See this article for some clues:

Livelink - Redirection

It's old and never updated by RIM, but might be useful.
Offline  
Old 08-28-2009, 03:09 PM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I send criteria as null all coordinates are 0. If I create criteria according to autonomous requirements I have null QualifiedCoordinates object. Maybe I need listener?
Offline  
Old 08-28-2009, 07:02 PM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Is GPS enabled in Options on the device?

Options / Advanced Options / GPS

The 9530 has autonomous GSP, so this has to work (as long as you are not indoors).
Offline  
Old 08-28-2009, 11:27 PM   #7 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Doug,

You are a man! The problem was there.

Thakn you very much for you help.

Otto
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.