我想在点击图像时向图像添加元数据,例如日期,所用时间以及用户可以添加自己的笔记的描述部分。
if (requestCode == GALLERY_IMAGE_REQUEST && resultCode == RESULT_OK && data != null)
{
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
imageUri = data.getData();
File imagesFolder = new File(Environment.getExternalStorageDirectory(), bubbleName);
imagesFolder.mkdirs();
File destFile = new File(imagesFolder, "bodypart_" + timeStamp + ".png");
try {
copyFile(new File(getPath(imageUri)), destFile);
imagegrid.setVisibility(View.GONE);
preview.setVisibility(View.VISIBLE);
finsihBtn.setVisibility(View.VISIBLE);
removeBtn.setVisibility(View.VISIBLE);
Picasso.with(this).load(imageUri).into(preview);
getPhotosList(bubbleName);
//imageAdapter.notifyDataSetChanged();
} catch (IOException e) {
e.printStackTrace();
}
}