Why do you need your mp3s to be named a certain way?
If you can copy them out of your resources using whatever name they
have there, and copy them to sd card under another name, then clearly
you are already able to match up the resource name with the desired
name, so why bother making a copy? Just have something that can
translate to/from the desired name as needed.





On Thu, Oct 8, 2009 at 4:29 AM, androidinsider <[email protected]> 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