Gmailでアンドロイド開く方法

タリクは以下となります。

私はちょうど私のアプリを通じてGmailアプリを開いてみたかったし、自分のアプリケーションからセット電子メール、件名とメッセージを望んでいました。

私はGmailServiceを試してみましたが、それは、BCCまたはCCの電子メールをサポートしていません。リンク:https://github.com/yesidlazaro/GmailBackground

BackgroundMail.newBuilder(this)
    .withUsername("[email protected]")
    .withPassword("password12345")
    .withMailto("[email protected]")
    .withType(BackgroundMail.TYPE_PLAIN)
    .withSubject("this is the subject")
    .withBody("this is the body")
    .withOnSuccessCallback(new BackgroundMail.OnSuccessCallback() {
        @Override
        public void onSuccess() {
            //do some magic
        }
    }).withOnFailCallback(new BackgroundMail.OnFailCallback() {
        @Override
        public void onFail() {
            //do some magic
        }
    }).send();

Iはアタッチメント、件名、およびメッセージとともにBCCとCC機能を使用したいです。

Friankgb:

テント経由オープンGmailの

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("[email protected]"));
intent.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail");
intent.putExtra(Intent.EXTRA_CC, new String[]{"[email protected]"});
intent.putExtra(Intent.EXTRA_BCC, new String[]{"[email protected]"});
intent.putExtra(Intent.EXTRA_SUBJECT, "your subject goes here...");
intent.putExtra(Intent.EXTRA_TEXT, "Your message content goes here...");

startActivity(intent);

ただ渡すEXTRA_CCEXTRA_BCC意図引数に

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=202774&siteId=1