This is my Android client code:
I am sending screenshot images to client and It is receiving in client and displaying in UI using ImageView. 

```
public class ScreenCast extends Activity{
ImageView iv;
Socket socket;
Bitmap bitmap;
@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    MyTask task=new MyTask();
    task.execute();
}

private class MyTask extends AsyncTask<Void, Void, Bitmap>{
    @Override
    protected void onPostExecute(Bitmap bitmap) {
        if(bitmap!=null){
            Drawable ob=new BitmapDrawable(getResources(),bitmap);
            iv=(ImageView) findViewById(R.id.imageView1);
            iv.setBackgroundDrawable(ob);
        }else{
            Log.d("Bitmap null","Empty");
        }
    }

    @Override
    protected Bitmap doInBackground(Void... arg0){
        try {
            socket=new Socket("192.168.237.1",3434);
            ObjectInputStream ois=new ObjectInputStream(socket.getInputStream());
            byte[] buffer=(byte[]) ois.readObject();

            BitmapFactory.Options options=new BitmapFactory.Options();
            options.inMutable=true;
            bitmap = BitmapFactory.decodeByteArray(buffer, 0, buffer.length,options);
            return bitmap;
        } catch (UnknownHostException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }
}
}

```

Now the problem I am getting is
 the first screenshot is displayed but images are not getting streamed (like video). But when I change the orientation the the updated screenshot display.
So how can I keep the screenshot images displaying continously in the UI

Logcat after updating my code as suggested by Mozarty.

```
01-13 18:12:29.665: E/AndroidRuntime(3915): FATAL EXCEPTION: AsyncTask #3
01-13 18:12:29.665: E/AndroidRuntime(3915): java.lang.RuntimeException: An error occured while executing doInBackground()
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.os.AsyncTask$3.done(AsyncTask.java:299)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.lang.Thread.run(Thread.java:856)
01-13 18:12:29.665: E/AndroidRuntime(3915): Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:4867)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:947)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.View.requestLayout(View.java:15430)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.View.requestLayout(View.java:15430)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.View.requestLayout(View.java:15430)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.View.requestLayout(View.java:15430)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:292)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.View.requestLayout(View.java:15430)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.view.View.setBackgroundDrawable(View.java:14589)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at com.qube.screenshotapk.ScreenShotNew$MyTask.onProgressUpdate(ScreenShotNew.java:44)
 01-13 18:12:29.665: E/AndroidRuntime(3915):    at com.qube.screenshotapk.ScreenShotNew$MyTask.doInBackground(ScreenShotNew.java:67)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at com.qube.screenshotapk.ScreenShotNew$MyTask.doInBackground(ScreenShotNew.java:1)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at android.os.AsyncTask$2.call(AsyncTask.java:287)
01-13 18:12:29.665: E/AndroidRuntime(3915):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
01-13 18:12:29.665: E/AndroidRuntime(3915):     ... 5 more

```