I am trying to take bytes and display them as an integer in android. I am using the bluetooth chat as a template, and am sending data from a bluetooth device, which is working fine and displaying fine. Now, instead of displaying the char set of the byte that is being sent, I want to display the integer value. This is the code from the Handle in the Bluetooth Chat developer code.
byte[] writeBuf = (byte[]) msg.obj;
// construct a string from the buffer
String writeMessage = new String(writeBuf);
mConversationArrayAdapter.add("Me: " + writeMessage);
I have tried making the byte array an integer array, which works however, I cannot get an integer array into a string... Can anyone help?