i have create an android application that will capture picture and save in sdcard folder,now i want to save the image with a custom name.
import java.io.Byte
File outFile = new File(Environment.getExternalStorageDirectory(), "myname.jpeg");
FileOutputStream fos = new FileOutputStream(outFile);
photo.compress(Bitmap.CompressFormat.JPEG, 100, fos);
fos.flush();
fos.close();
you would also need to add Permission in Android Manifest.
the snippet will save the content of photo
inside /sdcard
with the name "myname.jpeg"