title: TCP/IP Streaming in Android App
body: <p>I'm porting an app that I've already going working on Windows to Android. The premmis is the same, the server is continually sreaming out data packets and the client reads them in.</p>
  
  <p>The problem I have is that whilst the orginal app works just fine, the Android App connectes okay, but looses loads of packets - is there something I can simply change to fix this? </p>
  
  <p>This is the crux of the code (just v simply read bytes from the stream):</p>
  
  <blockquote>
    <p>private InputStream m_RDSInputStream;</p>
    
    <p>...</p>
    
    <p>for (int lBytesToRead = 0; lBytesToRead &lt; (lNetworkCarrierSize + lBytesSentFromServer); >lBytesToRead++)
    {
       int lDataByte = m_RDSInputStream.read();
       m_RDSInputDataBuffer[lBytesToRead] = (byte)lDataByte;</p>
    
    <p>}</p>
  </blockquote>
  
  <p>I've tried reading x bytes in one hit - but wind up with the same problem. I know the server and link are not the problem</p>
  
  <p>Thanks for any advise</p>
  
  <p>Mark</p>