i know this post is old .
im new to programming 
@aspidoff how did the code work out for you..
 
i want to  do tyhe same thing - copy files  from the assets to the sd card
but can one of you guy explain how the code works in more detail.

On Thursday, October 8, 2009 4:29:29 AM UTC-7, aspidoff wrote:

> hey guys, i hope this is the right forum. 
>
> what i am trying to do is simply copy over entire folder full of mp3 
> files onto sdcard within an app. I am doing this out of "assets" 
> folder because raw folder does not allow mp3 files to be named the way 
> i need them to. 
>
> here is what I dug up so far but not sure if this will work. i am lost 
>
>
> InputStream ins = getResources().getAssets().open(""); 
> int size = ins.available(); 
> // Read the entire resource into a local byte buffer. 
> byte[] buffer = new byte[size]; 
> ins.read(buffer); 
> ins.close(); 
> FileOutputStream fos = new FileOutputStream("/sdcard/myfolder/"); 
> fos.write(buffer); 
> fos.close(); 
>
>
> can someone help?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to