私は以下のテキストを持ち、電子メールでハイパーリンクとして送信したいと考えています。テキストのハイパーリンクを設定して電子メールで送信する方法
文字列id1String = "XES";
String id2String = "ZX02";
文字列appLink = "myapp:// myhost/myaction?id1 =" + id1String + "& id2 =" + id2String;
以下のコードを使用しましたが、動作しません。
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setData(Uri.parse("mailto:"));
emailIntent.setType("text/html");
emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);
emailIntent.putExtra(Intent.EXTRA_CC, CC);
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Your subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(appLink));
try {
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
finish();
Log.i("Finished send email...", "");
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(MainActivity.this, "There is no email client installed.", Toast.LENGTH_SHORT).show();
}
を使用してください。 – Praveen
@Praveen:私が最初にこのコードを実行しているので、私に例を与えることができます。 –
また、xml<![CDATA [Hyperlink name]経由で]> –
Praveen