제가 하고자하는 것은 배포파일을 설치했을때 assets폴더내에 이미지도 같이 폰에 깔고 싶은겁니다..특정폴더를 지정해서 말이죠..
어떻게 할 수 있는 방법이 있나요? 고수님들 부탁드립니다..꾸뻑~~
AssetManager assetManager = getAssets();
String[] files = null;
try {
files = assetManager.list("pictures");
String strSavePath = "/Test/Test.jpg";
int iFileCnt = files.length;
int cnt = 0;
for(int i=0; i<iFileCnt; i++)
{
String FullName = "pictures/" + files[i];
InputStream is = assetManager.open(FullName, AssetManager.ACCESS_BUFFER);
int legn = is.available();
byte[] tempdata = new byte[legn];
cnt = is.read(tempdata);
is.close();
File outfile = new File(strSavePath + files[i]);
outfile.createNewFile();
FileOutputStream fo = new FileOutputStream(outfile);
fo.write(tempdata, 0, cnt);
fo.close();
}
} catch (Exception e) {
android.util.Log.e("",e.toString());
}
이렇게하면 에뮬에서나 폰을 연결에서 컴파일 할때는 잘되는데 배포파일로 만들어서 폰에 파일을 넣고 폰에서 인스톨 시키면 이미지 파일이 안생기네요..경로의 문제인가요?? ㅠㅠ



