【问题标题】:Plaint text sharing(app attachments) not working after Gmail UpdatedGmail 更新后纯文本共享(应用附件)不起作用
【发布时间】:2019-12-13 12:04:13
【问题描述】:

过去 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 应用更新而发生。

【问题讨论】:

    标签: android android-intent android-sharing


    【解决方案1】:

    我在这里总结解决方案。每一项都至少为一个人工作。

    1. 如果有,请停止 Cloudflare DNS 应用程序 1.1.1.1。可能从 Cloudflare 应用程序中排除 Gmail。

    2. 向系统应用下载管理器授予完全权限(存储、后台数据等)。

    3. 清除系统应用下载管理器的缓存,这将提示您使用任何应用打开附件,请确保您的应用 选择已更新且没有问题。

    4.在“设置”中禁用Gmail应用,重启手机并再次启用。

    4 号对我有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-07-11
      • 2020-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-09
      • 1970-01-01
      相关资源
      最近更新 更多