Save file in data / data / package /

1

The function that I do is create a .PNG of the image that I select in the Gallery, until now I have been saving them in Internal Memory but now I want to save them in data / data / package / images but I do not know how to do it.

This is how I save them in the Internal Memory :

File dir = Environment.getExternalStoragePublicDirectory("Download/Images");

I need something similar but in the new route as I comment. I've tried this comment @Jorgesys but it has not worked:

File dir = new File(this.getFilesDir(), "/data/data/package/Images");
    
asked by UserNameYo 16.03.2017 в 23:18
source

1 answer

1

Use getFilesDir () to get the internal storage path:

// File dir = Environment.getDataDirectory("/data/data/otrointento.dos/Images");
File dir = new File(this.getFilesDir(), "/Images");
    
answered by 17.03.2017 в 00:16