0

content:// を file:// に変換する方法を知りたいです。私のアプリケーションでは、カスタム コンテンツ プロバイダーを実装しており、content: // を file:// に変換したいと考えています。

コード:

content://com.abc.provider.local.file/mail/attachment/1.jpg file:// に変換したい

String contentPath = LocalFileProvider.MAIL_FILE_URI + picture.getFileName(); 
Uri photoPath = Uri.parse(contentPath); 
4

1 に答える 1