Hi,
Ive been playing around with the camera function and have a few questions.
I took a few photo's earlier with the default AI2 camera and they were automatically named, something like "app_inventor_1613217757666.jpg" what convention is used for the number section of the filename ?
What would be the best / easiest method to create a similar unique number for naming photo's in a similar way if they were not already named with a unique identifier ?
Taifun thanks for that, is there a simple way to implement that convention.
Would have been a nice touch if you'd used that or something similar in your camera extension, its the default name im trying to get changed.
The Java code to provide a unique file name for each image that Google recommends is
// Create a media file name
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
File mediaFile;
if (type == MEDIA_TYPE_IMAGE){
mediaFile = new File(mediaStorageDir.getPath() + File.separator +
"IMG_"+ timeStamp + ".jpg");