private String getBubbleMetaData() {
    String bubbleMetaData = "";
    if (annotated) {
      // get bubble coordinates etc. to also send to server
      ArrayList<MyRect> rects = bubbleView.getRects();
      for (int i = 0; i < rects.size(); i++) {
        MyRect rect = rects.get(i);
        int type = 0;
        String text = rect.text;
        float centerX = rect.centerX();
        float centerY = rect.centerY();
        float bottomX = rect.right;
        float bottomY = rect.bottom;
        float topX = rect.left;
        float topY = rect.top;
        float endX = 0;
        float endY = 0;
        if (rect.speech) {
          MyTriangle tri = bubbleView.getTriangles().get(i);
          endX = tri.bottomX;
          endY = tri.bottomY;
          type = 1;
        }
        if (rect.thought) {
          MyThoughtBubbles mTB = bubbleView.getThoughtBubbles().get(i);
          endX = mTB.endX;
          endY = mTB.endY;
          type = 2;
        }
        if (rect.scene) type = 3;

        bubbleMetaData +=
            "<bubble type="
                + "\""
                + type
                + "\""
                + " text="
                + "\""
                + text
                + "\""
                + " centre="
                + "\""
                + centerX
                + "/"
                + centerY
                + "\""
                + " topLeft="
                + "\""
                + topX
                + "/"
                + topY
                + "\""
                + " bottomRight="
                + "\""
                + bottomX
                + "/"
                + bottomY
                + "\""
                + " end="
                + "\""
                + endX
                + "/"
                + endY
                + "\""
                + "/>";
      }
    }
    return bubbleMetaData;
  }