Hello, I am having a problem with my application since my smartphone was updated to a new version of Android. Here is the error returned by the debugger.
Here is the code I use to save my file
And here is what I indicated in my Manifest
The application is not published on the play store and has always worked for several years. From what I have read it seems that using DirRootExternal is no longer the correct method. How do I go about correcting this problem? Thank you in advance for your help.
B4X:
java.io.FileNotFoundException: /storage/emulated/0/File.pdf: open failed: ENOENT (No such file or directory)
Here is the code I use to save my file
B4X:
Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, "File.pdf", False)
pdf.WriteToStream(out)
out.Close
pdf.Close
And here is what I indicated in my Manifest
B4X:
AddPermission(android.permission.MANAGE_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_MEDIA_STORAGE)
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
The application is not published on the play store and has always worked for several years. From what I have read it seems that using DirRootExternal is no longer the correct method. How do I go about correcting this problem? Thank you in advance for your help.