/** * Return the content text. If there is intent in clip data, display intent, or display uri if uri * included, or html and text at last. * * @return the content in string. */ public String getDiaplayText() { String ret = null; if (this.isCoerceText()) { ret = this.getContent(); } else { ClipData.Item item = this.rawContent.getItemAt(0); CharSequence text = item.getText(); String html = item.getHtmlText(); Intent intent = item.getIntent(); Uri uri = item.getUri(); if (intent != null) { ret = intent.toUri(Intent.URI_INTENT_SCHEME); } else if (uri != null) { ret = uri.toString(); } else if (html != null) { ret = html; } else if (text != null) { ret = text.toString(); } } return ret; }