private String getFilename ( String filename , File file ) { if ( ! file . exists ( ) ) { file . mkdirs ( ) ; } String ext = ".jpg" ; //get extension /*if (Pattern.matches("^[.][p][n][g]", filename)){ ext = ".png"; }*/ return ( file . getAbsolutePath ( ) + "/IMG_" + new SimpleDateFormat ( "yyyyMMdd_HHmmss" ) . format ( new Date ( ) ) + ext ) ; }
Get the file path of the compressed file