I have a code that I had in my phone, which takes photos and saves it to the memory cell.
I would like to add the functionality to save the image with the shooting date included in the picture.
byte[] capturedImageData = videoControl.getSnapshot("encoding=jpeg&width=2000&height=1500");
String dirPhotos = "file:///e:/";
m_suministro = TxtSuministro.getString();
NombreFoto = m_suministro + "-" + ContadorFotos + ".jpg";
String fileName = dirPhotos + NombreFoto;
file = (FileConnection) Connector.open(fileName, Connector.READ_WRITE);
// If there is no file then create it
if (file.exists() == false) {
file.create();
ContadorFotos++;
}
// Write data received from camera while making snapshot to file
outStream = file.openOutputStream();
outStream.write(capturedImageData);
sample image with the date
tnx