最近3年来,我一直在与Gmail分享纯文本。使用下面的代码。
public static void openFeedBackMailer(Activity activity) {
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", "abc@gmail.com", null));
intent.putExtra(Intent.EXTRA_SUBJECT, "put your subject here");
intent.putExtra(Intent.EXTRA_TEXT, "put your body here");
//Check if Intent available
List<ResolveInfo> list = activity.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_ALL);
if (list.size() > 0) {
activity.startActivity(Intent.createChooser(intent, "Send email"));
} else {
Toast.makeText(activity, "No apps found!", Toast.LENGTH_LONG).show();
}
}
但是突然停止了。 调试并解决此问题后,此问题是由于Gmail应用程序更新引起的。
答案 0 :(得分:0)
我在这里总结解决方案。这些都至少为一个人工作。
1。。如果有,请停止Cloudflare DNS应用
1.1.1.1
。可能从Cloudflare应用程序中排除Gmail。2。。授予系统应用程序下载管理器的完全权限(存储,后台数据等)。
3。。清除系统应用程序Download Manager的缓存,然后将提示您使用任何应用程序打开附件,请确保您使用的应用程序 选择已更新且没有问题。
4。。在“设置”中禁用Gmail应用,重新启动手机,然后再次启用。
第4个对我有用。