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 Contributor
agmangas
Posts: 7
Registered: ‎08-20-2010
My Device: Bold 9000 ( Device Software 5.0 )
My Carrier: Vodafone Spain

Geolocation Service in Spain

[ Edited ]

Greetings everyone, this is my first post in these forums :smileywink:

 

I´m having a little problem with the Geolocation Service here in Spain.

 

I´m following the instructions of this article ( link ) but it seems I can´t get a position in cell-site mode.

 

First I try to set the Criteria to cell-site :

 

BlackBerryCriteria cr = new BlackBerryCriteria();
cr.setMode(GPSInfo.GPS_MODE_CELLSITE);

Then I try to get an instance of LocationProvider with that Criteria :

 

lp = LocationProvider.getInstance(cr);

But it returns a null value in lp, so I can´t register a new LocationListener to start getting position data. It works OK for autonomous and assisted modes.

 

It is a pretty simple code... so I suppose this happens because Vodafone Spain does not offer support for this funcionality, any ideas?

 

My test environment is the following :

 

  • Blackberry Bold 9000 running Device Software 5.0.0.592
  • Blackberry Java SDK Version:  5.0.0.25
  • Carrier : Vodafone Spain

Thanks in advance :smileyhappy:

 

EDIT : I tried this funcionality in a different project , now I´m getting a "UnsupportedOperationException", I´ve searched the forums and looks like I´m not the only one : Similar Problem

---------------------------------------------------------------
Andres Garcia Mangas
BerryLab Developer berrylab.es
Please use plain text.
Developer
titakalpesh
Posts: 203
Registered: ‎07-30-2009
My Device: Bold(9780),Curve(8520)
My Carrier: Vodafone

Re: Geolocation Service in Spain

Hi,

 

please try with passing null in LocationProvider.getInstance(null) may be you get the location but may be as your provider does not offer support for this functionality it's difficult to say about this because I was check with GPSInfo.GPS_MODE_CELLSITE I'm also not get the data with vodafone india but when i tried with above code it's worked so please check it.

 

Thanks

Tita

Please use plain text.
New Contributor
agmangas
Posts: 7
Registered: ‎08-20-2010
My Device: Bold 9000 ( Device Software 5.0 )
My Carrier: Vodafone Spain

Re: Geolocation Service in Spain

Thanks a lot for your answer titakalpesh :smileywink:

 

I´ve a doubt... if I use LocationProvider.getInstance(null) how do I define the Criteria ?

 

Could you provide me with an example of the code you´re using ? ( nothing too extensive, just the few lines of code to define the geolocation and start receiving data ).

---------------------------------------------------------------
Andres Garcia Mangas
BerryLab Developer berrylab.es
Please use plain text.
Administrator
MSohm
Posts: 14,226
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Geolocation Service in Spain

Passing in null as the criteria results in autonomous mode.  The following chart explains the various criteria combinations and outcomes.

 

Define criteria to retrieve a GPS fix

http://supportforums.blackberry.com/t5/Java-Development/Define-criteria-to-retrieve-a-GPS-fix/ta-p/4...

 

From the sound of things it doesn't appear that your carrier supports cell site mode.  I recommend verifying that with them.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Contributor
agmangas
Posts: 7
Registered: ‎08-20-2010
My Device: Bold 9000 ( Device Software 5.0 )
My Carrier: Vodafone Spain

Re: Geolocation Service in Spain

OK, I´ll try to contact them.

 

Thanks for your answer.

---------------------------------------------------------------
Andres Garcia Mangas
BerryLab Developer berrylab.es
Please use plain text.