This path //file/
will never exist.
See also here:
Does it really work? I don't think so, at least not with the compiled app (APK).
//
) and as I said this path: //files/
doesn't exist (and will never be created). So remove the .IsDevelopment
and if_then_else
blocks.global strPath
See also here:
Dear Anke,
it worked, but I changed it as you mentioned and Download still works.
However, path to the file looks like this:
BUT, the copy Function is still not working...
So the Web
component also adds the ASD path (like the File
component):
/storage/emulated/0/Android/data/<packageName>/files/
automatically. Try this:
I think I know whats wrong:
fileName is the complete path , eg --> /storage/emulated/0/Android/data//files/files/file.pdf
so this:
Would lead to the following path:
/storage/emulated/0/Android/data//files/files/storage/emulated/0/Android/data//files/files/file.pdf
Am I right?
So what would be the correct blocks?
Yes, the path is correct. But did you get an error message?
What do you get from the .Copied
event?
No, the block / path is correct and should be:
/storage/emulated/0/Android/data/<packageName>/files/files/file.pdf
It looks like the variable "fileName" is not the correct value. It contains the entire path to the file instead of just the filename.
The question is if this path / file exists. Check that.
You replace the ASD
plus /kundc/
and add this path back in the copy function.
This doesn't make any sense at all. So this would be the way to go:
This would not work because I need the "global file" = filename with folder structure also for the CopyAsync funtion (copy toFileName)
It should look like this:
Note: As already said, this will no longer be possible when AI2 targets Android 11 (targetSdkVersion = 30 (Aug 2021 or for updates Nov 2021). Only if no further updates have to be made later would it actually be no problem to do it this way..
EDIT: Of course it should be:
Do it once and do it neatly according to the art and not according to your ideas. In a few months you will find your application not working and waste a week fixing it again. If you already have files downloaded to ASD, why do you copy them to another directory? Leave them in the ASD and load them into the app from ASD.