简体   繁体   English

Android没有应用可以执行此操作

[英]Android no apps can perform this action

I have found two threads on the same topic with no solution that I can use, I am looking to click on an email address and automatically open an email app and send email, my code seems fine to me but I get the "No apps can perform this action" 我找到了同一主题的两个主题,没有我可以使用的解决方案,我希望点击一个电子邮件地址并自动打开一个电子邮件应用程序并发送电子邮件,我的代码似乎很好,但我得到“没有应用程序可以执行此操作“

This is the method I am using; 这是我正在使用的方法;

 textView_emailid.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                    textView_emailid.toString(), "your@email.com", null));
            intent.setType("text/plain");
            intent.putExtra(Intent.EXTRA_SUBJECT, "Book an Appointment");
            intent.putExtra(Intent.EXTRA_TEXT, "Hi " + name);
            startActivity(Intent.createChooser(intent, "Send Email"));
        }
    });

Change your intent.setType("text/plain") to intent.setType("message/rfc822") . intent.setType("text/plain")更改为intent.setType("message/rfc822")

Try the code snippet in this post directly without changing anything since it's the correct solution: https://stackoverflow.com/a/2197841/5250273 直接尝试此帖子中的代码段而不更改任何内容,因为它是正确的解决方案: https//stackoverflow.com/a/2197841/5250273

If you still get "No apps can perform this action", then your device does not have any email application (since it may be rooted?). 如果您仍然收到“没有应用可以执行此操作”,那么您的设备没有任何电子邮件应用程序(因为它可能已植根?)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有应用可以执行此操作(Android) - No Apps can perform this action android 没有应用程序可以执行此操作 - 打开图像 - No Apps Can Perform This Action - Opening Image 尝试将EditText表单提交到我的电子邮件时出错? 没有应用程序可以执行此操作吗? - Error When Trying To Submit EditText Form To My Email? No Apps Can Perform This Action? 没有应用程序可以执行此操作(Android电子邮件) - no app to perform this action android email Android - 使用语音命令执行操作 - Android - Perform an action with voice command Android-尝试发送whatsapp消息时收到错误消息“没有应用程序可以执行此操作”? - Android - getting an error “no application can perform this action” while trying to send a whatsapp message? Android-每单位时间执行动作 - Android - Perform Action Every Unit of Time 定义组合键以在Android中执行操作 - Define key combination to perform an action in android Android:如何避免在切换按钮上同时执行操作 - Android :How to avoid to perform action simultaneously on togglebutton IllegalStateException: 在 onSaveInstanceState 和 onActivityResult 之后无法执行此操作 - IllegalStateException: Can not perform this action after onSaveInstanceState with onActivityResult
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM