Add some files to my android app folder - android

I am planning my android app with some files in the app folder, but i didn't figure out how to add files to my project. I don't want to use the files as resources because the user should be able to save or download more files in the same folder and i just wanted to add the basic set of files.
Can anyone help me? :/

I don't want to use the files as resources because the user should be able to save or download more files in the same folder and i just wanted to add the basic set of files.
There is no direct means of doing this. If you package your files as assets (in assets/) or as raw resources, you are welcome to copy them out of your APK into internal storage on first run of your app.

Related

Downloadable files in my application

I created a project which uses Fragments, and in one of them I want to add some clickable icons that will allow to download a file (one per icon).
I have the files stored on my computer.
I suppose that they have to be copied into my application.
How I can implement this in the code?
I hope that this picture can explain what I want to do.
will allow to download a file and they have to be copied into my application don't match: If the files are already on the device (once your app is installed), what is the sense of downloading those files again?
Therefore, either provide your files inside your app or use a file server and download them.
If you decide to provide the files in your app, this will increase the installation time.
But it would not require an internet connection to download the files again.
So, simply put your files in the raw or in the assets folder and that's all.
Then simply access your files from that folder.
If the folder isn't already found in your project, simply create it and drop your files in it.

Update html files in android app

I want to add some HTML files in my program that can be update later.
I want to add these files in assets folder but I can't rewrite files when downloaded.(eclipse)
The assets folder is inside of you package - obviously you can't edit that.
Download such updates to your applications data directory. You'd then have to check in code if there is a file in the data directory, and if not use the one in assets.

Android adding files on install

Is there any way to add files in Android storage on install? Like some image/video that will be stored there on install and if needed it would be loaded, like pushing a button or something like that ?
Is there any way to add files in Android storage on install?
Not really. You are welcome to package files as assets, then copy them to internal storage on first run of your app. Or, depending on what sort of file it is and what you want to do with it, you might be able to just use the original copy of the file as an asset directly.

How to Update Assets Folder in Android Dynamically from Web Service?

In assets folder in my Android project, i have .dat and .xml files. They must be updated periodically. I don't want to update them by myself, there is a web service that i will store new .dat and .xml files as .json objects. How may i make the application update assets folder by itself?
Thanks.
As Siddharth Lele mentions in the comments, you cannot update assets/ at runtime, except by upgrading the app to one that contains a newer assets/.
You can, however, download your .dat and .xml files to internal storage. Then, when you need to use one of these files, check internal storage first. If there is a file there, use it. If not, fall back to the copy in assets/.

Android - Download a folder from server or anywhere from internet and apply changes according to it in app

I just finished one app, but i want to let user install different language packs (a folder containing mp3 files ), and also apply those mp3 files in my app ! how should i do it ?
how to let user user download that folder ?
and how to make changes in my app as they download ?
(this is like google maps app, they tell you which map you want to install and so on ! mine is related to mp3 files ! )
You cannot download folder. Folder is just a container, but all the data is held in files, not folders. So you have to download all files stored in folder or, which may be simplier, distribute your files in archive (like zip), then no matter how many files is needed, or what folder structure you need, all you have to do is download one file and unpack it.

Categories

Resources