How do you save a file as pdf to be matching with all android versions easily?

Well it is all there...

You do not seem to be using a finish block, as per the documentation.

You are using the 10 blocks, therefore your pdf will be saved to the application specific directory:

/storage/emulated/0/Android/data/<packageName>/files/yourpdf.pdf


I using finish block and it's already save the file ... the problem is with Android 11 " the file does not appear "
what are missing blocks??????????

Where are you expecting the file to appear with just those blocks ?

What blocks are you using to display the pdf or show its file path ?

Where are you expecting the file to appear with just those blocks ?
the answer is : Yes
just by using those blocks .... the file is saved with old android version like 5 , 8 , 9

What blocks are you using to display the pdf or show its file path ?
the answer is yes
this is what I'm looking for.... the missing blocks are like what??
To show the pdf file so the blocks are what? can you give me some suggestions to how show the pdf file or the file path .... if you please.


is that what you mean by how files can appear?


i'm still waiting your suggestions :cry:


They are my blocks used to save the vertical arrangement components ... the file is saved with all android version except the version 11.
So how can save this file with any android version ???????????
I can't believe that after all this time there is no solution to saving files with android 11
where are MIT app inventor helpers ?????????????? Where are the genius app inventors in all the world wide????????
after these blocks ...what are the required blocks ???? to save with android 11 or any android version ???????

I have just tested these blocks:

The pdf file is saved (as I previously advised you) to:

/storage/emulated/0/Android/data/<packageName>/files/mynewPDF.pdf

when using the companion app, <packageName> is:

edu.mit.appinventor.aicompanion3

With Android 11 you can only access the saved pdf file from this location and from within your app, unless you move it / copy it. You can do this with the Taifun File extension. You need to set the DefaultFileScope to Shared in Screen1 properties in the designer, and you will need the file component to get the ASD (for these blocks). Once compiled, this method successfully copied the pdf I created to the Documents folder, and this was then accessible and viewable using other apps on my device.

image

If you need access by other means then perhaps export the file to an online resource like Google Drive

There is also this extension:

which will allow you to view an entire pdf using the webviewer.

No extension is required for this:

Btw, here is another bug with the File comp.

grafik

I want a link for this extension " File 1 "
If you please

Its a component.

grafik

Many thanks Anke :heart_eyes:; I will try and I will give you a feedback about the result

Precisely :slight_smile:

you might want to start a new thread to report that bug and add a small example project how to elicit the error, so @ewpatton and the team can fix it...

Taifun

We already discussed this bug (on Aug 20, 2021).
In fact, that was your own topic (and you reported this bug yourself):

ok, fine...
well, in that case it is not another bug, it is an already known bug... :wink:
Taifun

Okay, I should have written:
Another (unfixed) bug ... :wink:

Thank you Anke Thank you soooooooooo much , really you are genius :hugs::+1: it works now

there is only one thing... you should switch screens correctly...
see also https://puravidaapps.com/manager.php

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

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