08-20-2010 01:58 PM - edited 08-20-2010 03:24 PM
Greetings everyone, this is my first post in these forums
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 :
Thanks in advance
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
08-21-2010 08:25 AM
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.
08-21-2010 10:29 AM
Thanks a lot for your answer titakalpesh
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 ).
08-24-2010 11:24 AM
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
From the sound of things it doesn't appear that your carrier supports cell site mode. I recommend verifying that with them.