I\'m writing a camera2 app in android and when I try to save the image, something adds extra numbers on the end of the filename before the \'.jpg\'
I have a feeling
Those random numbers are explicitly generated by createTempFile(), as seen in the source code.
createTempFile()
You probably don't want to use temporary files anyway, thus I'd recommend to create normal files:
File image = new File(storageDirectory, imageFileName + ".jpg");