Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
639 views
in Technique[技术] by (71.8m points)

android - Is it possible to save image in assets folder from application

I want to save image from a url in assets folder. I can save image in internal memory or sd card but I want to save in the assets folder.

I searched about it online but some results are saying that the assets folder is not writable. Is it possible to write image in that folder?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

No, you can't. But why do you need it to save it in there? if you want it to be store in the private area of your application (so your application is the only with access to it), you can do it, but if you want an image to be in your assets folder, you need to place it in there before you compile to create the apk.

Data Storage - Internal Memory

P.S. I don't recommend you to save large images on internal storage as this space is very limited in legacy devices.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...