• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bluetooth blues (stream related I believe)  RSS feed

Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have instances where I seem to be missing header information sent to me over a Bluetooth data stream. I am also wondering if I am getting all of the data or not (truncating before the end).

My app is based off of the BluettothChat application for Android. Here is the code I am wondering about:

Now to me, this LOOKS like it could miss data since it never checks for a -1 that I understand indicates when the end the stream has been reached.

Anyone have an idea based on this code (which again, comes from Google's BluetoothChat example app) might not get the beginning bytes of a stream on occasion and also, if it looks like it will get all of the stream given it never checks for the end of it.


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!