Hier habe ich diesen Code gefunden:
Java
File storageDir = new File(
Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES
),
"MyApp"
);
Dann versuche ich dort hereinzuschreiben: storageDir.getAbsolutePath() + "/test.png"
Bekomme dann vom System:
Code
ERROR - DataWriterFile - /storage/emulated/0/Pictures/MyApp/test.png: failed to open this file
ERROR - DataWriterAdaptor - open(): Opening data writer implementation failed
ERROR - BitWriter - Opening data writer failed
ERROR - ScreenShotFactory - Could not open file /storage/emulated/0/Pictures/MyApp/test.png
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> ist auch gesetzt.