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
Visitor
Posts: 1
Registered: ‎05-17-2010
My Device: 8100,8520,8530
My Carrier: T-Mobile, Verizon

Cellsite LBS without on-board GPS

[ Edited ]

I am working with the Blackberry 5.0 API and a special LBS service pushed down by the Blackberry team, but I have run into a unique issue with a project we are developing.

 

Device: 8520

OS: 5.0

Carrier: T-Mobile

 

I am receiving a Permissions Denied error when I attempt to set a LocationListener as follows: (Note, any try-catch statements are not included in this code example)


BlackBerryCriteria bbc = new BlackBerryCriteria(GPSInfo.GPS_MODE_CELLSITE);

BlackBerryLocationProvider myBlackBerryLoc = (BlackBerryLocationProvider) LocationProvider.getInstance(bbc);
                    if(myBlackBerryLoc!=null)
                    {
                        myBlackBerryLoc.setLocationListener(new handleGPSListener(), -1, -1, -1);
                    }
                    else
                        statusField.setText("bbloc is null");

 

Equally, when I attempt to generate any location object, I receive a LocationException due to timeout:

 

Location tempLoc = myBlackBerryLoc.getLocation(300);
speedField.setText(""+tempLoc.getQualifiedCoordinates().getLongitude());

 

I believe it is because there is no GPS capabilities on the phone itself, but cell-site should not require it. The nature of the project does not assume GPS capabilities, besides cell-site location. Is there something I am not taking into account? Why am I not able to create a LocationListener or a Location object?

Contributor
Posts: 19
Registered: ‎08-11-2010
My Device: 8520
My Carrier: Orange France

Re: Cellsite LBS without on-board GPS

Is there someone that can help? I run into the same problem on Orange France network. How can I get the geolocation info with cell site on BB curve 8520?

Highlighted
Regular Contributor
Posts: 64
Registered: ‎02-03-2010
My Device: Bold
My Carrier: Orange

Re: Cellsite LBS without on-board GPS

Please look at this thread : 

http://supportforums.blackberry.com/t5/Java-Development/GPS-location-issue-for-Black-Berry-Applicati...

 

This is the only way ( i know of ) , to get the lang && lat using the cell site - By sending some information from the RadioInfo class to a google webservice, and parsing the answer. It would have been great if the simple way as you put it worked, but it doesn't. 

 

Hope this helps

Contributor
Posts: 19
Registered: ‎08-11-2010
My Device: 8520
My Carrier: Orange France

Re: Cellsite LBS without on-board GPS

Thanks for your reply. So RIM cannot support Cell site location on Blackberry 8520?

 

 Why we have to use Google API on BB devices instead of RIM API? If I understand well from the devblog posted by RIM this July: http://devblog.blackberry.com/2010/07/blackberry-geolocation-service/

 

It seems that they SHOULD support cell site location.

 

HOW?

Regular Contributor
Posts: 64
Registered: ‎02-03-2010
My Device: Bold
My Carrier: Orange

Re: Cellsite LBS without on-board GPS

well, according to the example in 

http://supportforums.blackberry.com/t5/Java-Development/How-to-Use-the-Geolocation-Service/ta-p/5487..., you were doing the correct thing. 

 

I haven't been able to make this work, but anyway, i've only tried on pre 5.0 OS devices, So if you're developing on 5.0+ OS, maybe you can find how to make it work. ( Though i see you're developing for 8520, and i doubt it supports OS 5).  Having said that, i also remember reading that one of the new features in OS 6.0 is cell site location support, so that makes me wonder if it really is supported in OS 5.0. 

 

Anyway, querying the google api is less complicated than it looks, just a few copy pastes Smiley Happy