I am trying to convert an hexadecimal number into a decimal number, but it doesn't work for very large values (over 2,147,483,647 in decimal),because int type is limited there.
Here is my code which works for integers
String nombreHexa = h2d.getText().toString();
if (isHex(nombreHexa) == true) {
int deciInt = Integer.parseInt(nombreHexa, 16);
String newDeci = String.valueOf(deciInt);
resulth2d.setText(newDeci);
}
I tried to make deciInt a long
but it wasn't so simple. The problem seems to come from the parseInt function (parseLong doesn't exist as well)
Does some one know how I should do it?