How to rename a file in internal Storage?
问题 I have an image that I got from the user's album and I saved it in a folder. here is the code: filename = "pippo.png"; try { ContextWrapper cw = new ContextWrapper(getApplicationContext()); File directory = cw.getDir("imageDir", Context.MODE_PRIVATE); // Create imageDir File myPath = new File(directory,filename); FileOutputStream out = new FileOutputStream(myPath); theImage.compress(Bitmap.CompressFormat.PNG, 90, out); out.flush(); out.close(); Log.d("Image","saved success"); picture =