Details of my phone:
Model:Blackberry Curve 8520
Version :5.0.0.1036
data services :on
When I am installing google maps I am able to see the location ,so there is a chance of obtaining the current location using this phone.
I am trying to develop an application which will show the current location of the phone,by using the cell site locations because this phone model does not have an in-built GPS device.
I am using the following code:
BlackBerryCriteria bc=new BlackBerryCriteria(GPSInfo. GPS_MODE_CELLSITE );
try {
LocationProvider lp=LocationProvider.getInstance(bc);
if(lp !=null)
{
Location loc=lp.getLocation(-1);
add (new EditField(loc.getQualifiedCoordinates().getLatitude()+"\n"+loc.getQualifiedCoordinates().getLongitude(),""));
}
else
{
add(new EditField("unable to find the location provider", ""));
}
} catch (LocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}}
I am installing the alx file on the bb phone using desktop manager.
On starting the application it is giving me an Uncaught exception:
NET.RIM.DEVICE.API.SYSTEM.UNSupportedOperationException.