help me I tried to do like you but Im getting this error msg ...... sorry Im very beginner on it
help me I tried to do like you but Im getting this error msg ...... sorry Im very beginner on it
when exactly does that error occur?
this will help to find the corresponding malicious blocks...
Taifun
You are missing a forward slash /
before storage for your pathToPdf and you have an extra forward slash /
after the 0
, should be
/storage/emulated/0
/Documents/myFile.pdf
I still getting the same error msg. I dont have an SD card on my cell phone do you think its the problem?
Android creates a virtual SD card, it is not the problem.
Go back to your blocks, and test each part of your workflow to find out where it breaks. You have been provided with a working set of blocks by @Anke.
Does your if/else conditional test work ?
Is the file downloaded ?
What is the path to the downloaded file ?
What is the path after you move the file ?
Does the pdf display ?
Set toScope → FileScope
to Shared
This should work as long as the file has not already been created by another app (e.g. with Companion):
However, if this is the case, the file name must be different (e.g. myFile1.pdf
). Create the APK and test it (without testing with Companion beforehand).
I now checked it also on one of my Android < 10 devices (Android 9) and the app crashes, if FileScope is set to Shared. This is another bug with the File component. So it must be set to Legacy (at least on devices with Android < 10).
now I´m getting this msg open failed: EACCES (Permission denied)
why i cant download the file to my phone, I need to download to ASD and them move the file to my phone ? do you have an extension that i can download directly to my phone?
paths are case sensitive... it is /Documents
and not /documents
Taifun
I changed it... still with the same problem...
please provide a screenshot of your updated blocks...
also you might want to delete the pdf file in that directory in case it already exists
Taifun
Have you tried my APK before? If so, did it work?
I cant find the pdf thats the problem.. Im able to download and open the pdf but I cant find it on my phone....
yes i tried it but your apk does exatly the same thing... saves the pdf on ASD ... and im trying to save it on my phones memory ...
that is on kodular... its so easy to download ... why here on mit app inventor I need to download to ASD and then move to a internal memory ???
How about answering my question?
i did my friend
are you saying, now you do not get the error anymore?
did you check the Download
and Documents
directories?
if you can't find the file, probably moving the file from ASD to shared directory does not work then?
what does the MoveFile block return?
you can find it out using Do it...
Taifun
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.