Frage

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?

War es hilfreich?

Lösung 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());
       }

Andere Tipps

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)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top