java - how can I read information of an unknown source (byte,string...)? -
i'm new in world of java , android , i'm developing android app.
the app connects tablet non-android device(medical) bluetooth , has show information on screen.
the problem dont know how understand information receive, because dont know how device sending inf, lenght of byte stream, etc.
bassed on bluetoothchat sample i've tried with:
byte[] buffer = new byte[1024]; int bytes= mminstream.read(buffer); message = new string(buffer,0,bytes); and when show message has no sense;
note: information should numbers, , maybe words, think sends numbers.
you can't. if receiving long list of bytes , have no idea means, best possibly write out byte values in hex or decimal. need find out format of output stream make use of it.
Comments
Post a Comment