1.I have an android client application in which i am grabbing frames from the camera and writing them into the socket.
2.There is some communication between server and client before each frame is sent, so that i have to use functions like inbuffer.readLine().
3.When this activity starts, i create a separate thread for sending frames in onResume().
4.The problem is that while the frames are being sent, if i press the back button, it takes around 5-6 seconds ( the preview keeps running and frames are still being sent ) to go back to previous activity or may not even listen to the touch !!
I would really appreciate if someone could guide me as to how i can overcome this issue. Thankyou !
Maybe an AsyncTask would help solve your problem.