1.通过FilePath获取Uri
Uri uri = Uri.fromFile(new File(entity.getFilePath()));
2.通过数据库id获取Uri
Uri uri = ContentUris.withAppendedId(contentUri, Long.parseLong(id));
1.通过FilePath获取Uri
Uri uri = Uri.fromFile(new File(entity.getFilePath()));
2.通过数据库id获取Uri
Uri uri = ContentUris.withAppendedId(contentUri, Long.parseLong(id));
本文标题:Uri获取
本文链接:https://www.haomeiwen.com/subject/khsjjltx.html
网友评论