Android Assets No Value Read?
Posted
by BahaiResearch.com
on Stack Overflow
See other posts from Stack Overflow
or by BahaiResearch.com
Published on 2010-06-14T01:36:52Z
Indexed on
2010/06/14
1:42 UTC
Read the original article
Hit count: 222
AssetManager assets = myContext.getAssets();
String[] files = assets.list("MyFolder");
InputStream myInput = assets.open("MyFolder/" + files[0]);
int i = myInput.read();
in this case 'i' is -1 meaning nothing read.
Why would nothing be there if the file is there, the variable 'files' has the file as well.
Do I need to do anything to the file I put into the Assets folder in get it to be readable?
© Stack Overflow or respective owner