Action_send 意图不适用于电子邮件 ID 字段

Action_send intent not working for Email-ID field

我正在尝试使用 Action_send 意图复制邮件 ID 并与所有已安装的可共享应用程序共享邮件 ID。但默认情况下它正在调用 gmail 应用程序。 createChoose 无法正常工作。

 if (!textViewEmail.getText().toString().equals("") &&       !textViewEmail.getText().toString().equals("NA")) {
                Intent intent = new Intent(Intent.ACTION_SEND);
                intent.setType("text/plain");
                textViewEmail.setTextColor(Color.BLUE);

                try {
                    startActivity(Intent.createChooser(intent, "Share Using"));

                } catch (android.content.ActivityNotFoundException ex) {
                    Toast.makeText(ProfileActivity.this, "There is no  client installed.", Toast.LENGTH_SHORT).show();

                }
            }return true;

试试下面的代码。

Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, emailTextview.getText().toString());
startActivity(Intent.createChooser(shareIntent, "Share Email Address to"));

希望对你有帮助..!!