Android Question java.lang.NumberFormatException: Invalid hex double:0x456

fifiddu70

Well-Known Member
Licensed User
Longtime User
hello, i need to use two edittext for insert vendor id and product id of the my print in my code, when the read vid and pid from edittext i have this error: java.lang.NumberFormatException: Invalid hex double:0x456
0x456 is vendor id.
how to resolve?
 

fifiddu70

Well-Known Member
Licensed User
Longtime User
how to convert make the vendor id code read from an edittext and from another edittext the thermal printer product id? at the moment it works well only by entering the code directly as an example:
B4X:
usb1.SetCustomDevice (usb1.DRIVER_SILABS, 0x456, 0x808)
if I insert the two edittex instead:
Code:
B4X:
 usb1.SetCustomDevice (usb1.DRIVER_SILABS, txtvendorid.text, txtpruductid.text)
in this way I receive the error:
java.lang.NumberFormatException: Invalid hex double: 0x456
what can you do to make it read correctly by the two edittext?
 
Upvote 0
Top