Android Question Problem runtime permissions

Status
Not open for further replies.

ViMeAv ICT

Member
Licensed User
Longtime User
I use this in the main activity, and this worked okay last week.
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:

MaaMoz

Member
Licensed User
Longtime User
Good Morning

Having same problem.
No accepting to write to external storage

AddPermission in Manifest: OK
rp.CheckAndRequest: Done in App

Our APP was working fine until system update on April 22. 2021

Only difference: Using SdkVersion 30

Phone: Samsung Galaxy S10 Lite
Android Version: 11 >> Had system update yesterday

Thank you for looking into the problem.
 
Upvote 0
Status
Not open for further replies.
Top