Reputation: 45
Right now, I finished with my custom camera application that will save the picture that I took into sdcard. But I want to put these pictures in a folder which will be create when you took your first photo.
Working step: Start my application > took a photo > check for the folder to stored in > if sdcard already have that folder then stored the photo inside the folder but if it doesn't have a folder then create new one > stop
something like this. Hope you understand what I mean, Thanks.
Upvotes: 0
Views: 3550
Reputation: 28541
Just before saving your file, simply create all the directory structure, the mkdirs method will do the necessary work if necessary.
new File("/sdcard/photos/newfolder").mkdirs()
Upvotes: 1