I'm trying to store an image in pictures.Hello,
But I get an error message:
java.lang.RuntimeException:
java.io.FileNotFoundException: /storage/emulated/0/Pictures/Image5_1.jpeg: open failed: EPERM (Operation not permitted)
I suppose there is a problem with permissions, but I don't know this subject.
Attached my manifest file.
Dim picturesFolder As String = File.Combine(File.DirRootExternal, "Pictures" )
StoreCanvasToJpeg (picturesFolder,filename)
Sub StoreCanvasToJpeg (folder As String, filename As String)
Dim Out As OutputStream
............
Out = File.OpenOutput(folder, filename, False)
CanvasCible.Bitmap.WriteToStream(Out, 100, "JPEG")
Out.Close
End Sub
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />