Shared File scope not working for Saving file in web responsefilename in second screen

I am using the Web component to save pdf file from a website.

In screen1 (startup) I have set Defaultfilescope as shared. When I set responsefilename = download/Test.pdf in Screen1, it saves at /storage/emulated/0/download/Test.pdf. I am showing the saved file path in a label.

But the same code and components in screen 2 give me a saved file path to /storage/emulated/0/android/data/edu.mit....../download/Test.pdf.

I want the screen2 response to also save at /storage/emulated/0/download/Test.pdf (shared one).

Users can later find the files in the download folder easily. Why does the default path change from screen1 to screen2 even when Defaultpath in screen1 is set as shared?

blocks (2)

Directory names are case sensitive, correct would be /Download/Test.pdf
What happens, if you set the default file scope to Legacy?
What happens, if you use a full path, i.e. /storage/emulated/0/Download/Test.pdf?
Taifun

I have changed it to 'Download' not 'download'.. Still the same result

When I put the default file scope to legacy same result..

If I put the scope to App then both Screens have the same response as Screen2.(/storage/emulated/0/android/data/edu.mit....../download/Test.pdf.)

When I set responsefilename = /storage/emulated/0/Download/Test.pdf ..

It seems the path for responsefilename is preset. the input works as only a file name or an appended path to it..

I finally used this.. works for both screens. I don't know how..even when the default scope is set to app. it saves to the correct -> /storage/emulated/0/Download folder

I have to use three extensions just to download and open with activitystarter. While customwebview downloadhelper and filetools are great extensions , it's a lot for just download and view.

What about providing a screenshot of your relevant blocks?
It looks like you have been confused... it is emulated and not emulator...

Taifun

blocks (4)

1 Like

Ok so its a known issue.. Thanks ...

Any progress on this...? @ewpatton

I'll revisit it. I did have a potential solution but I think there was a corner case in the companion that was causing it to fail. We may need a patch to the code generator as well as to the companion to make it work correctly.

Specifically, you could a sequence like open Project A Screen1 and then transition to Screen2, open project B Screen1 and then switch back to Project A and the scope setting would be the one from project B not project A.

1 Like

Ok, this is probably getting unnecessarily complicated. We can work around the problem pretty easily by moving the file from the ASD to the Shared folder afterwards.

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