Search This Blog

Thursday, 10 May 2012

How to get network location when GPS is not available in blackberry


Hello friends,
           Here is the code for Blackberry to get the Tower location when GPS is not available in blackberry

CODE:

BlackBerryCriteria _criteria = new BlackBerryCriteria(LocationInfo.GEOLOCATION_MODE);
BlackBerryLocationProvider  _locationProvider=(BlackBerryLocationProvider)LocationProvider.getInstance(_criteria);
                                BlackBerryLocation _location = (BlackBerryLocation)_locationProvider.getLocation(-1);

double _lat = _location.getQualifiedCoordinates().getLatitude();
double _lon = _location.getQualifiedCoordinates().getLongitude();



Sorry , this thing is giving problems,i just counter that ,i m unable to get network location from this , try GEOLOCATION_MODE_CELL or something else i am also doing R&D on this will update you soon

No comments:

Post a Comment