tigrot Well-Known Member Licensed User Longtime User Aug 25, 2017 #1 One Beta Tester (Api 24) produced this error: Code: Copy 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) Code: Copy 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
One Beta Tester (Api 24) produced this error: Code: Copy 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) Code: Copy 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
tigrot Well-Known Member Licensed User Longtime User Aug 25, 2017 #2 Forgot to write that the target in manifest is 18... Upvote 0
Computersmith64 Well-Known Member Licensed User Longtime User Aug 25, 2017 #3 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
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.
DonManfred Expert Licensed User Longtime User Aug 25, 2017 #4 You may test my first published lib... https://www.b4x.com/android/forum/threads/storage-v1-0.49253/ Probably you can check with it if the Permission is given before you write to that folder. Upvote 0
You may test my first published lib... https://www.b4x.com/android/forum/threads/storage-v1-0.49253/ Probably you can check with it if the Permission is given before you write to that folder.
tigrot Well-Known Member Licensed User Longtime User Aug 25, 2017 #5 This was the first run of the App. Probably the user didn't change anything. I'm contacting the user (i have phone number of the users) just to confirm . Thank you! Upvote 0
This was the first run of the App. Probably the user didn't change anything. I'm contacting the user (i have phone number of the users) just to confirm . Thank you!
tigrot Well-Known Member Licensed User Longtime User Aug 25, 2017 #6 No manual intervention made from user. No visible cause for the issue... Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2017 #7 You should check that File.ExternalWritable returns True. Upvote 0
tigrot Well-Known Member Licensed User Longtime User Aug 28, 2017 #8 Thank you Erel! Can you explain what could be the condition to produce this? Mauro Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 28, 2017 #9 Not really sure. It is probably not related but in older devices the "external" storage was locked when the device was connected to a computer. Upvote 0
Not really sure. It is probably not related but in older devices the "external" storage was locked when the device was connected to a computer.