Android Question Unexpected crash while testing my app. (Permission Error)

tigrot

Well-Known Member
Licensed User
Longtime User
One Beta Tester (Api 24) produced this error:
B4X:
Exception java.io.FileNotFoundException: /storage/emulated/0/Android/data/it.whereami.logicdata/files/param (Permission denied)
java.io.FileOutputStream.open (FileOutputStream.java)
java.io.FileOutputStream.<init> (FileOutputStream.java:221)
anywheresoftware.b4a.objects.streams.File.OpenOutput (File.java:370)
anywheresoftware.b4a.objects.streams.File.WriteString (File.java:258)
it.whereami.logicdata.starter._jobdone (starter.java:472)
java.lang.reflect.Method.invoke (Method.java)
anywheresoftware.b4a.BA.raiseEvent2 (BA.java:186)
anywheresoftware.b4a.keywords.Common$11.run (Common.java:1144)
android.os.Handler.handleCallback (Handler.java:751)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:154)
android.app.ActivityThread.main (ActivityThread.java:6310)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:872)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:762)
The code relative to the error is a few rows(writing a parameter file)
B4X:
Select Case Job.JobName
            Case "httpparam"
                Dim risp As String=Job.GetString
                securestrin=risp
                File.Writestring(File.DirDefaultExternal,"param",risp)
                startsystem
         End Select

This code worked till today for a lot of tester. I'm not sure it has been tested under Android 7+, since I've not done myself.
Does anybody tell me what is wrong?
Thank you very much

Mauro
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
In Android 6+, the user can go into the app manager & manually turn permissions on/off. Might want to check that this user hasn't done that.

- Colin.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top