D Deleted member 103 Guest Oct 2, 2020 #1 Hi, I have a Nokia 7.1 with android 10 and have no access problem to File.DirRootExternal and that even though I do not use the attribute "requestLegacyExternalStorage". A customer of mine, with Galaxy A50 Android 10, gets the following error message: "Caused by android.system.ErrnoException: open failed: ENOENT (No such file or directory)". The file is listed by the app, but cannot be opened. How can it be that I do not get the same error message with my Nokia? Does anyone here know why? Spoiler: Error Fatal Exception: java.io.FileNotFoundException /storage/emulated/0/Master-Of-Regularity/logs/20201001_211940.log: open failed: ENOENT (No such file or directory) Fatal Exception: java.io.FileNotFoundException: /storage/emulated/0/Master-Of-Regularity/logs/20201001_211940.log: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:496) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289) at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.Initialize2(RandomAccessFile.java:103) at fg.MasterOfRegolarity.main._vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6(main.java:4695) at fg.MasterOfRegolarity.main._btnreset_click(main.java:1442) at java.lang.reflect.Method.invoke(Method.java) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197) at anywheresoftware.b4a.BA.raiseEvent(BA.java:193) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:7870) at android.widget.TextView.performClick(TextView.java:14970) at android.view.View.performClickInternal(View.java:7839) at android.view.View.access$3600(View.java:886) at android.view.View$PerformClick.run(View.java:29363) 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:7814) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
Hi, I have a Nokia 7.1 with android 10 and have no access problem to File.DirRootExternal and that even though I do not use the attribute "requestLegacyExternalStorage". A customer of mine, with Galaxy A50 Android 10, gets the following error message: "Caused by android.system.ErrnoException: open failed: ENOENT (No such file or directory)". The file is listed by the app, but cannot be opened. How can it be that I do not get the same error message with my Nokia? Does anyone here know why? Spoiler: Error Fatal Exception: java.io.FileNotFoundException /storage/emulated/0/Master-Of-Regularity/logs/20201001_211940.log: open failed: ENOENT (No such file or directory) Fatal Exception: java.io.FileNotFoundException: /storage/emulated/0/Master-Of-Regularity/logs/20201001_211940.log: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:496) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289) at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.Initialize2(RandomAccessFile.java:103) at fg.MasterOfRegolarity.main._vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6(main.java:4695) at fg.MasterOfRegolarity.main._btnreset_click(main.java:1442) at java.lang.reflect.Method.invoke(Method.java) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197) at anywheresoftware.b4a.BA.raiseEvent(BA.java:193) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:7870) at android.widget.TextView.performClick(TextView.java:14970) at android.view.View.performClickInternal(View.java:7839) at android.view.View.access$3600(View.java:886) at android.view.View$PerformClick.run(View.java:29363) 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:7814) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
Erel B4X founder Staff member Licensed User Longtime User Oct 2, 2020 #2 1. Think carefully if you really need this folder. Soon it will be much more difficult to access it. Use File.DirInternal or rp.GetSafeDirDefaultExternal. 2. Read this: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/ You cannot access this folder without the attribute. I guess that your device allowed access because it was previously installed with a lower targetSdkVersion. Upvote 0
1. Think carefully if you really need this folder. Soon it will be much more difficult to access it. Use File.DirInternal or rp.GetSafeDirDefaultExternal. 2. Read this: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/ You cannot access this folder without the attribute. I guess that your device allowed access because it was previously installed with a lower targetSdkVersion.
D Deleted member 103 Guest Oct 2, 2020 #3 Thank you Erel, you absolutely right. If you reinstall the app, the error can be reproduced. Upvote 0