在 Android 中无法将 pdf 共享到 Evernote

Sharing pdf to Evernote not working in Android

我正在通过将此意图传递给 createChooser():

创建一个用于共享的 pdf
Intent shareIntent = ShareCompat.IntentBuilder.from(activity)
            .setType("image/*")
            .setAction(Intent.ACTION_SEND);
            .putExtra(Intent.EXTRA_STREAM, uriToPdf);
            .getIntent()
            .addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);

这适用于邮件、保管箱和其他应用程序,但由于某种原因,它在 Evernote 中显示的文件结尾为 .null,但文件大小是正确的。

如何将 pdf 上传到 Evernote?

我认为问题出在您的文件类型中的星号 - 这不是 Evernote 中受支持的 MIME 类型。资源支持的类型是 listed in the Evernote API documentation:

image/gif
image/jpeg
image/png
audio/wav
audio/mpeg
audio/amr
application/pdf