I use this in the main activity, and this worked okay last week.
But today i can't get it work again?
ERROR: (on file.writestring)
java.io.FileNotFoundException: /storage/emulated/0/1.txt: open failed: EPERM (Operation not permitted)
MANIFEST:
AddPermission(android.permission.WRITE_MEDIA_STORAGE)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
Any idea?
But today i can't get it work again?
B4X:
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, YaeOrNay As Boolean)
If YaeOrNay = True Then
File.WriteString(File.DirRootExternal, "1.txt", "This is the file in the root external directory")
end if
ERROR: (on file.writestring)
java.io.FileNotFoundException: /storage/emulated/0/1.txt: open failed: EPERM (Operation not permitted)
MANIFEST:
AddPermission(android.permission.WRITE_MEDIA_STORAGE)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
Any idea?
Last edited: