I don’t think there is a direct way to get the name of the image to be drawn if you do not save the image name with the image.
In XML, you can do the following to set the image name as additional data for viewing images
android:tag="btful.png"
imagename
ImageView img = (ImageView) findViewByID(R.id.img)
img.settag("btful.png");
, getTag()
String imageName = (String)img.getTag();
user831722