I have a program which runs at boot, but when it attempts to read a file from DirRootExternal I get permission errors (File.Exists() appears to return true in this case). The file reads without errors when I run the program in the normal way (ie. not at boot).
I have tested this with a simpler program (see the attached project). With this project I delayed the loading of the file using a timer, and when I set it to 1 millisecond and reboot the emulator, File.Exists() appears to return False (MsgBox does not pop up), but when I set it to 10000 (10 sec) MsgBox does pop up, and it has loaded the file.
Is there a period after boot, during which the B4A file permissions are not set yet ? If so, how can I test it, as a timer seems an unreliable way to determine when it is safe to read a file.
I have tested this with a simpler program (see the attached project). With this project I delayed the loading of the file using a timer, and when I set it to 1 millisecond and reboot the emulator, File.Exists() appears to return False (MsgBox does not pop up), but when I set it to 10000 (10 sec) MsgBox does pop up, and it has loaded the file.
Is there a period after boot, during which the B4A file permissions are not set yet ? If so, how can I test it, as a timer seems an unreliable way to determine when it is safe to read a file.