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
Highlighted
Developer
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Geolocation alternatives for legacy devices

[ Edited ]

I need to be able to compute very quickly GPS coordinates and the only performance which is good enogh is provided by the cellsite/geolocation mode in gps. The rest are just too slow during the initial satelite locking and often are unable to deliver any valid data if there is no view of the sky.

 

So I need some online service like Google Gears(unfortunately google gears has been discontinued) which can accept requests and give me information for my location(latitude, longitude) based on the data I provide(cell id, mnc, mcc, network name etc.)

 

For OS6 devices I utilize the Blackberry APIs successfully but for 5.0 Pearl 9100 in a GSM network cellsite/geolocation seems to be non available - the location provider for the criteria is null.

----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Geolocation alternatives for legacy devices

Check the diagnostic code avallable here:

http://supportforums.blackberry.com/t5/Java-Development/Location-APIs-Start-to-finish/ta-p/571949

 

You migth find you have coded it wrong and CellSite is available.  I had.

Developer
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: Geolocation alternatives for legacy devices

Yes I checked it and it seems to be unable to create provider for the cellsite criteria on 2 different OS5 devices.

So I guestt it is not supported. That is why I am thinking to try some third party geolocation services like Google Gears but as I mentioned it is discontinued in favour of HTML5 where geolocation is natively supported but the browser on the OS5 devices also doesn't support HTML 5.
----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Geolocation alternatives for legacy devices

Which devices are you struggling with.  My testing suggests it works on the OS 5.0 devices I have tried. 

Developer
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: Geolocation alternatives for legacy devices

I am testing on Pearl 9100 and Bold 9000(updated to 5.0).

 

On Torch 9800 and Bold 9780 both with os 6.0 the code works well.

 

All the devices are in a GSM network.

 

Here is how I setup the criteria:

 

Criteria c = new Criteria();	c.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
c.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
c.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
c.setCostAllowed(true);

 

adn then 

 

LocationProvider.getInstance(c);

 

returns null.

 

Also

GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_CELLSITE)

 

is flase.

 

 

 

----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Geolocation alternatives for legacy devices

OK, I'm going to struggle to test those devices with SIMs in sorry.

 

Hopefully someone else can.

 

Just checked my criteria and the only difference is that I use:

c.setPreferredResponseTime(30000);

 

This is production code and I have not had any reports of issues, but that doesn't mean anything....