05-17-2010 04:14 PM - edited 05-18-2010 01:45 PM
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.
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);
myBlackBerryLoc.setLocationListener(new handleGPSListener(), -1, -1, -1);
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);
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?
08-11-2010 07:15 AM
Please look at this thread :
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
08-11-2010 10:12 AM
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-g
It seems that they SHOULD support cell site location.
08-15-2010 03:57 AM
well, according to the example in
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