为什么不在 StreamProvider 中获取 UriFromFile?

Why not getUriFromFile in StreamProvider?

我正在使用 https://github.com/commonsguy/cwac-provider 来共享存储在 "getExternalFilesDir" 中的文件,因为 Android FileProvider 没有用于此的标签(尽管文档说它有,但你知道它是一个旧的此类文档中的错误)

我知道并不是每个与 StreamProvider 共享的内容都是一个文件,但是有一个 "getUriFromFile" 方法会很有用。既然没有这样的方法,我需要创建uris吗"manually"?

Since there is no such method, do I need to create the uris "manually"?

是的。

I understand that not every content shared with StreamProvider is a file

这就是我选择不尝试创建这种方法的原因,至少目前是这样。