I have an pojo like this:
public class LocationPoint {
protected double la;
protected double lo;
public double getLat() {
return la;
}
public void setLat(double value) {
this.la = value;
}
public double getLong() {
return lo;
}
public void setLong(double value) {
this.lo = value;
}
}
The scenario: After doing something on a MapView activity I get back to the activity that called id
if (resultCode == RESULT_OK) {
int latitude = data.getIntExtra("Latitude", 0);
int longitude = data.getIntExtra("Longitude", 0);
if (latitude!=0 && longitude!=0)
{
LocationPoint p = new LocationPoint();
p.setLat((double) latitude);
p.setLong((double) longitude);
}
The int latitude = 43802334 and int longitude = 24825592 The converted values in p are: 4.3802334E7 and 2.4825592E7
I want the double value to be without E7, because the web service throws an error because of it. I am doing something wrong and can't understan why. Can you give an advice ? Thanks