he desarrolado una app y ahora tengo que guardar un archivo para poderlo abrir con otra app y no lo he logrado, ya intente con todas las posibilidades del foro y no lo logre, alguna nueva sugerencia para el tema
Ok so you have a app which saves a file and need to be opened by another app which is yours or someone else's?
Anke
March 22, 2022, 5:58pm
3
Are you sure ? I don't think so.
I've posted a lot about this subject.
Anke
March 22, 2022, 6:18pm
4
Here is just a small selection:
And tell us which file is saved - media [jpg, png, mp3,...] or non-media [txt, csv, pdf,...].
If the File was created by Companion before you try to test with the APK, it does not work, because the file was created by another app and no longer be overwritten / accessed by a new app (on Android 11+).
Two options:
delete the file via Companion before closing Companion or
the file name must be different with Companion and APK.
See also here:
This one doesn't work with Companion and the compiled APK on Android 11+ as it doesn't delete the text file when Companion or the APK is closed. Therefore, after testing with Companion, the file cannot be overwritten via the APK and vice versa.
So either you
do not test with Companion or
delete the file via Companion before closing Companion or
the file name must be different with Companion and APK.
Note: If the user uninstalls and reinstalls the app it does not work anymore, because the…
Please always post a link to it (and "if possible", spell the (my) name correctly ("Anke"):
This test aia works fine.
Try also this test app (and follow the notes): saveToShared_2.aia (3.0 KB)
[grafik]
Non-media file that are saved in one of the Shared folders (/Documents or /Download) MUST be created by the app itself. The APK and the Companion app are different apps. So the text file must be removed before testing (with Companion or APK beforehand).
See also here:
We don't yet know exactly what the purpose / goal is.
However, if it is to be done with another app, then this app can use SAF for it.
What information and where does it come from? Is this information from the respective user or general information? What exactly is the goal / purpose of your app?
Therefore, in my guide , I always point out to explain what exactly the goal is.
Which images? Where do they come from?
Fragen über Fragen!
Also erkläre mal, worum es eigentlich geht.
*___________________
Nachtrag: Die Bilder (25-80MB) kannst du im Shared storage speichern (e.g. /DCIM/myImages/... oder /Pictures/myImage…
From an Android point of view there are an → Internal Storage and an → External Storage .
1. Internal Storage
The Internal Storage can only be accessed with a rooted device.
1.1 The app package is saved in
/data/data/<packageName>/
In order to be able to debug your app, AI2 saves the assets for → Companion on devices with
Android ≥ 10 (API ≥ 29):
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/assets/
Android < 10 :
/storage/emulated/0/Android/data/edu.mit…
1 Like
Taifun
March 23, 2022, 12:59am
5
you have to save it to shared storage
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.