相关疑难解决方法(0)

Sharing text from app to Email app in android

I have the following code which used to send text from my app to Email:

Intent mail = new Intent(Intent.ACTION_VIEW);
            mail.setClassName("com.google.android.gm","com.google.android.gm.ComposeActivityGmail");
                mail.putExtra(Intent.EXTRA_EMAIL, new String[] {  });
                mail.setData(Uri.parse(""));
                mail.putExtra(Intent.EXTRA_SUBJECT, "Country Decryption");
                mail.setType("plain/text");
                mail.putExtra(Intent.EXTRA_TEXT, "my text");
                ctx.startActivity(mail);  
Run Code Online (Sandbox Code Playgroud)

It works , but as you see, it uses Gmail app, how do I make it use Email application instead of Gmail?

I mean this app: 电子邮件应用程序

and what about sharing to Facebook ? I found that Facebook does not support sharing using intent anymore, and …

email android share android-intent

0
推荐指数
1
解决办法
3077
查看次数

标签 统计

android ×1

android-intent ×1

email ×1

share ×1