I would go with (3) - rename the image file. There is an alternative though, which may be useful to you.
JPG images can contain EXIF data. This is data which is designed to be read by a machine to give it information about the image.
For example, the location where the image was taken, the time it was taken, the focal mode used, etc.
It would be possible for you to create the images with EXIF tags for name, time, ID, and anything else you wanted.
Using Android, you can call Exif Interface to read the tags from the image.
Very roughly, your code will be something like....
String image = //path to your image.
ExifInterface exif = new ExifInterface(image);
String MyID = exif.getAttribute("MyID");