Saving image to sd with current date and time in name doesn't work
问题 In my application I use a button to launch Camera application and save picture to specific folder on sdCard naming it by current date and time. When I hardcode the name for the picture, it works fine, but if I'm trying to put date in the name it doesn't work at all. Intent imageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); File imagesFolder = new File(Environment.getExternalStorageDirectory(), Constants.IMAGE_FOLDER_URI); imagesFolder.mkdirs(); Date d = new Date();