I am trying to transfer remote Bluetooth under the file
while ( AvailableBytes & gt; 0) {bytes read = instream.red (tempData, 0, tempData.length); MmOutStream.write (tempData, 0, bytesRead); MmOutStream.flush (); AvailableBytes = inStream.available (); } / * End of available bouts * / While the writing for the large file (500 KB) is in progress, I called the IO exception "IOE EXPRESS: 12 to 15 minutes after connection Time out " When I'm sending a small file that & lt; 100 KB, I'm successful in transferring. While the file transfer is in progress, I am not locking the socket, is there any limit in the Android that Bluetooth socket can only be active for a certain time frame?
InputStream.available () does not do what you think it does:
The number of bytes that can be read (or left over) gives this input stream to this input stream without blocking it by the next caller of a method.
Write the correct perspective until you hit the bytes == -1, signaling EOF (end-of-file).
Comments
Post a Comment