I've written a piece of code which connects through socket and receive data to load bitmap image on phone ... it works perfectly in android 2.3.X but blocks the data on android 2.2 when bytes read reached 2048.. it doesn't read anything more than that and get stucked over there
I read on multiple forums that android 2.2 block large files but if the data on stream can split into chunks then it can be read. here is the piece of code i've written for it isRvcdData = socket.getInputStream(); byte[] chunk = new byte[1024]; if (socket.isConnected() && !socket.isClosed()) { while (isRvcdData.available() < chunkLength) { Thread.sleep(10); } iByteLengthRead = isRvcdData.read(chunk, 0, 1024); } please help me out as how to read the whole data from stream on android 2.2 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en