基于android的远程桌面控制 请高手指点!!!!!!!!!!
服务端核心代码:Socket s = ss.accept();
BufferedImage bufferedImage = null;
BufferedOutputStream bos = new BufferedOutputStream(s.getOutputStream());
while (true) {
bufferedImage = robot.createScreenCapture(rect);// 抓取全屏图像
if(bufferedImage != null){
ImageIO.write(bufferedImage, "png", bos);
}else {
System.out.println("ImageBuffered is Null");
}
Thread.sleep(10);//图片采集时间
}
android 客户端核心代码:
下面是放到while循环里的,
Socket s;
Bitmap bm = null;
bm = BitmapFactory.decodeStream(s.getInputStream(), null, null);
imageView.setImageBitmap(bm);
问题就是:
因为在while循环里如何能让bm = BitmapFactory.decodeStream(s.getInputStream(), null, null);够成一张完整的图片出来之后再生成下一张图.
我这个思路对吗.
基于android 的远程桌面,还有其他什么好的方法吗?
我是初学者,请高手指点............
补充:移动开发 , Android