문제

I have 15-20 xsl files in res/raw folder.When 1st application is gets installed on device at that time I want to just copy that res/raw folder all xsl files to applications data/data/package/raw folder.How can I do this?

도움이 되었습니까?

해결책 3

I got the solution and its working good.

Field[] fields=R.raw.class.getFields();
       for(int count=0; count < fields.length; count++){
           Log.i("Raw Asset: ", fields[count].getName());
       }

다른 팁

Why don't you copy them to your application's cache folder ?

in Activity class there is method. If there is no file it will creates the file and returns the outputstram and it won't take file separator just have to give the filename it will directly creates a file in /data/data/packagename/ only i think u can't create a folder but u can create a file here using this method.

openFileOutput(name, mode)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top