Runtime Error File .ReadFrom

I made a little change in the code of an old app, and it is no longer working. Now, I get a Runtime Error.
I gives not more clues. But I believe it happens when File1 .ReadFrom executes and tries to read a file from the SD.
It only happens when the app is Built (tested in two different devices with old Android versions, <10). But It works fine with the companion (Version 2.60).
Might it be due to some changes in release nb 187?

Did you set DefaultFileScope to Legacy in the Designer?
If not, do it and try again.

I updated companion to Version 2.61, and now it tells "The file can't be found".
How can I keep reading my files from SD?
I generate those files in Excel and send to the device via e-mail, and move them from downloads folder to DS root.
Then I need the app to read them.

Thanks a lot Anke (for such a quick reply on sunday!).
I set to Legacy and now it works again on the companion (V 2.61)
But the runtime error remains in the compiled app.
Is there a place where I can learn more about the DefaultScope property?

What does "DS root" mean?
(Device Storage? Then it should work on devices with Android < 10)

Post a simple test aia, that reproduces this issue.

There you are.
There is the .aia and the File
TestFile.csv (87 Bytes) RuntimeErrorFileReadFrom.aia (1.9 KB)

It works fine with the companion (2.61, if you set to Legacy the DeffaultScope property of File1), But it gives you a Runtime Error when the app is built.

As I said, set DefaultFileScope to Legacy:


Android 9:


1 Like

Oh, sorry.
You mean set to Legacy the DefaultFileScope property of the Screen1 component!
I thougth your meant the DefaultScope property of File1 component.
Now it works again.
Thanks a lot.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.