I just have a question :

Is it possible to when i create my byt[] with :

byte[] decoded = Base64.decode( StringBase64 );

and

Uri uri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI,
values);

I try to use this constructor:

File m_File = new File(uri)

and after initiate values of my uri to stock wav file,  I launch :

 MediaPlayer mp = MediaPlayer.create(context, uri);
 mp.start();

is it possible to make something like that or is it a  totaly bad way.

My quest is here to find the better way to save and after listen my
File.wav decoded base64.

Thanks

Dany



On Aug 18, 9:08 am, Dany BREARD <[email protected]> wrote:
> I just want to save my byte[]
> into a .vaw audio file. on android emulator.
>
> i'm going to try everything
>
> Thanks everyone
>
> see you
>
> On Aug 17, 12:02 pm, TomTasche <[email protected]> wrote:
>
> > If you want to create a file on your device (or emulator), you have to
> > change the path.
>
> > try this:
>
> > ---
> > File oText = new File("/sdcard", "File");
> > ---
>
> > instead of:
>
> > ---
> > File oText = new File("C:/Documents and Settings/.../workspace/
> > SocketInterface", "File");
> > ---
>
> > P.S.: If you only want to write text into a file, your code is very
> > complicated!
> > ---
> > FileWriter writer = new FileWriter(new File("/sdcard/text.txt"); //
> > catch exception...
> > BufferedWriter buffWriter = new BufferedWriter(writer);
>
> > buffWriter.write("android rocks");
> > ---
--~--~---------~--~----~------------~-------~--~----~
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