Timestamp of generated bitmap - Android

2019-05-14 13:29发布

问题:

I have an app where I have downloaded an image file from the web and I save this file in external storage.

Later, to add this image to the media store, I call:

MediaStore.Images.Media.insertImage(getContentResolver(),
                fullPath, "IMG_"+System.currentTimeMillis(),null);

However, my picture always adds to the end of the gallery - it thinks that the picture was taken in 1970. How do I change this information?

Thanks!

回答1:

Worked using JPEGS (not PNG!) with ExifInterface