I understand I can open a file in assets folder like this.
InputStream is = ((Activity) mView).getAssets().open("some.txt");
But what should I do to save back to the same file? I mean how do I get OutputStream of the same file?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As per my knowledge you can’t because
/assetdirectory is not writeable, So you can’t make any changes on file which are in /asset directory, Its because Android .apk file is only readable.For more info look at this discussion Writing to file Assets folder And this SO question How to write files to assets folder or raw folder in android?