Skip to content
Advertisement

save image file with increment at the end of file name

enter image description here

please someone help me “To save an image file with increment at end of file name” like(“image 1.jpg , image 2.jpg , etc..”)

here is my code

please some help me to make this,i am new learner to android-studio.

JavaScript

Advertisement

Answer

If I have understood your question properly then, I assume you want your pictureFile name to be appended by an integer (in auto-incrementing fashion).

You could do that by maintaining a global variable as int imageCount = 1

and then appending it while creating fileName

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement