@Override public void onClick(View v) { // TODO: send the ding-type msg. EMLog.i(TAG, "Click to send ding-type message."); String msgContent = msgEidtText.getText().toString(); Intent i = new Intent(); i.putExtra("msg", msgContent); setResult(RESULT_OK, i); finish(); } });