I'm using runtime permission
When I try to load an image from external storage on target API29 I get Permission denied error
the same code works fine on target API28 or less
the problem only occurs when the first install is targeting API29, if the app was installed with an older API then installed a new version with API29 no problems
When I try to load an image from external storage on target API29 I get Permission denied error
the same code works fine on target API28 or less
the problem only occurs when the first install is targeting API29, if the app was installed with an older API then installed a new version with API29 no problems
B4X:
** Activity (main) Resume **
Error occurred on line: 183 (Main)
java.io.FileNotFoundException: /storage/emulated/0/1.jpg: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:496)
at java.io.FileInputStream.<init>(FileInputStream.java:159)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:214)
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.initializeSampleImpl(CanvasWrapper.java:601)
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.InitializeResize(CanvasWrapper.java:548)
at anywheresoftware.b4a.keywords.Common.LoadBitmapResize(Common.java:1371)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1083)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:1038)
at k0.zgridview.zgridview._sv_scrollchanged(zgridview.java:669)
at k0.zgridview.zgridview$ResumableSub_Reload.resume(zgridview.java:486)
at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1705)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8016)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167