读取多个彩信图片附件,如何读取 第二 / N多 个图片附件?
大概代码:
cPart = context.getContentResolver().query("content://mms/part", null, "mid=827" , null, null);
coloumns = cPart.getColumnNames();
String[] values= new String[coloumns.length];
for (int i = 0; i < cPart.getColumnCount(); i++) {
values[i] = cPart.getString(i);
}
if (values[3].equals("image/jpeg"){
getVideo(values[0]);
}
//读取视频/音频/图片
private byte[] getVideo(String _id) {
Uri partURI = Uri.parse("content://mms/part/" + _id);
InputStream inputStream = null;
byte[] ret = new byte[0];
try {
inputStream = context.getContentResolver().openInputStream(partURI);
if (inputStream != null)
ret = InputStreamToByteArray(inputStream);
} catch (FileNotFoundException e) {
Log.v("==" + e.getMessage());
}
return ret;
}
我只拿到了首个图片,如何继续拿到另一个,还是说图片其实是全部拿到了的?