I want to update a file in assets folder when the user click a button.
my listener is a classic
OnClickListener myUpdateListener = new OnClickListener() {
public void onClick(View v) {
updateAllParams();
}
};
The new file is to an url in this form
http://sample.test/android/params.dtf
the file in assets folder is
params.dtf
But I don't know how to do replace this file with the new version on the site.
I want to update a file in the assets folder
No, you cannot.
The assets folder is read-only, you cannot write or update any file present there.
You cannot update the assets folder after the application has been packaged and installed. You can, however, store to the device's memory and read in your file from there. More on this subject can be found at http://developer.android.com/guide/topics/data/data-storage.html#filesInternal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With