我在本地应用程序中存储了一些图像,这些图像与某些上下文(如联系人)相关联。我正在通过ChooserTargetService使用直接共享(API23+)来显示可供选择的内容,我希望ChooserTarget实例具有Icon填充有了这些图像。所以我想我可以为此使用android.support.v4.content.FileProvider(在ChooserTargetService::onGetChooserTargets中):valfile=File(File(filesDir,"images"),imageFileName)valcontentUri=FileProvider.ge