How can I make the document I'm using download with the application when the APK is installed in App Inventor? The program I created is associated with a text, but it doesn't download when I install it on the phone.
Please elaborate
What kind of document?
Downloading from where to where?
???
Taifun
The program that appears in the middle on my phone when the application is downloaded.
It is an asset in your app, so it stays within the app? Are you referencing it from your assets ?
When I downloaded the APK of the program, this file did not download with the program.
This is the start of the program where I should obtain the information, but it does not download with the program's APK, or it downloads somewhere else.
It looks like you are using the file component and try to read that file from the assets of your app
Did you set the FileScope to Assets?
http://ai2.appinventor.mit.edu/reference/components/storage.html#File
Below we briefly describe each scope type:
- App: Files will be read from and written to app-specific storage on Android 2.2 and higher. On earlier versions of Android, files will be written to legacy storage.
- Asset: Files will be read from the app assets. It is an error to attempt to write to app assets as they are contained in read-only storage.
- Cache: Files will be read from and written to the app’s cache directory. Cache is useful for temporary files that can be recreated as it allows the user to clear temporary files to get back storage space.
- Legacy: Files will be read from and written to the file system using the App Inventor rules prior to release nb187. That is, file names starting with a single
/
will be read from and written to the root of the external storage directory, e.g.,/sdcard/
. Legacy functionality will not work on Android 11 or later.- Private: Files will be read from and written to the app’s private directory. Use this scope to store information that shouldn’t be visible to other applications, such as file management apps.
- Shared: Files will be read from and written to the device’s shared media directories, such as
Pictures
.
Taifun
When I am emulating the application on the website, I have no problem, but when I generate the .APK, it tells me that there is no file.
Thank you, it helped me a lot
You did not answer the question
And in case you did not, then let me suggest you to do so and then you also do not need the 2 slashes
Taifun
Yes, but even then the 2 slashes work.