Thanks it's working now.
I've not been able to find the code used for the implementation of getCurrentLocation for Blackberry.
I saw this code on Stackoverflow and it worked for me, maybe it could be added to it to make it work better.
private BlackBerryCriteria blackBerryCriteria = null;
private BlackBerryLocation blackBerryLocation = null;
private BlackBerryLocationProvider blackBerryLocationProvider = null;
double lat = 0.0;
double lng = 0.0;
blackBerryCriteria = new BlackBerryCriteria();
if(GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_CELLSITE))
{
blackBerryCriteria.setMode(GPSInfo.GPS_MODE_CELLSITE);
}
else if(GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_ASSIST))
{
blackBerryCriteria.setMode(GPSInfo.GPS_MODE_ASSIST);
}
else if(GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_AUTONOMOUS))
{
blackBerryCriteria.setMode(GPSInfo.GPS_MODE_AUTONOMOUS);
}
else
{
blackBerryCriteria.setCostAllowed(true);
blackBerryCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
}
try {
blackBerryLocationProvider = (BlackBerryLocationProvider) BlackBerryLocationProvider.getInstance(blackBerryCriteria);
blackBerryLocation = (BlackBerryLocation) blackBerryLocationProvider.getLocation(60);
QualifiedCoordinates qualifiedCoordinates = blackBerryLocation.getQualifiedCoordinates();
lat = qualifiedCoordinates.getLatitude();
lng = qualifiedCoordinates.getLongitude();}catch(Exception e)
{
System.out.println("Error in location :"+e.toString());
System.out.println("Error in location :"+e.getMessage());
}