핸들러 부분입니다.

 

byte[] writeBufer = (byte[]) msg.obj;
             String writeImage = new String(writeBufer);
             Painting.arVertex.add(?????????????????????);

 

이며

 

좌표값을 받는 부분은

public boolean onTouchEvent(MotionEvent event) {
  
  if (event.getAction() == MotionEvent.ACTION_DOWN) {
   arVertex.add(new Vertex(event.getX(), event.getY(), false));
   return true;
  }
  if (event.getAction() == MotionEvent.ACTION_MOVE) {
   arVertex.add(new Vertex(event.getX(), event.getY(), true));
   invalidate();
   return true;
  }  
  return false;
 } 

 

 

Vertex는

 

public class Vertex {
 Vertex(float ax, float ay, boolean ad){
  x = ax;
  y = ay;
  Draw = ad;
 }

 float x;
 float y;
 boolean Draw;
}

 

입니다.

 

질문이 무엇이냐 하면,

Vertex에 저장된 좌표값을 핸들러를 이용해 다른 기기로 전송하고 싶습니다.

근데 이것을 어떻게 보내야 할지 모르겠습니다.

제가 생각하는것은 String으로 하나의 변수로 보내는게 좋을까 싶은데 이게 생각만큼 되질 않습니다.

점의 좌표를 어떻게 하면 쉽게 옮길수 있을까요???

애초에 제가 생각한방법은 아닌건가요? ㅠㅠ