I have a TCP Client running on Android. The Server is an OBD2 Dongle. I am getting an InputStream which is saved in a String but it's a hex number.
The Response of the TCP Server looks like that: FD A8 F1 FF 1F D0 03 20 It is a 8byte long hex number but I it is sent as a String, so I need to convert it to hex.
How can I do that?
Edit:
InputStream is;
is = socket.getInputStream();
while(var_Receive){
BufferedReader rd = new BufferedReader(new InputStreamReader(is);
String line = rd.readLine();
System.out.prinln(line);
}
And this is exactly what I see on screnn 'FD A8 F1 FF 1F D0 03 20' including the spaces between.