Use this:

http://developer.android.com/reference/android/media/MediaScannerConnection.html

Force it to scan the new file. Then your audio file will show up when
using the Music app.

On Aug 20, 2:49 am, kk_Kiran <simplyurki...@gmail.com> wrote:
> Thx for your reply Marco.
> WhilerecordingtheaudioI need to specify output file path. So I
> have already added the title and path for the recorded file. That file
> is being created with correct name and correct path in sdcard. The
> only problem is emulator is not able to scan the file and thus that
> file is not getting listed in music menu until emulator is closed and
> relaunched.
>
> On Aug 20, 12:15 am, Marco Nelissen <marc...@android.com> wrote:
>
>
>
> > If you create a media file, it is your responsibility to add it to the
> > database with a proper title, artist, album, etc.
>
> > On Wed, Aug 19, 2009 at 8:23 AM,kk_Kiran<simplyurki...@gmail.com> wrote:
>
> > > Hi friends,
>
> > > I have created an basic sound recorder application using MediaRecorder
> > > class. It has 3 buttons i.e.
>
> > > 1.Record : Startrecording
> > > 2.Stop     : Stoprecording
> > > 3.Play      : Play recorded file ( 3gp format)
>
> > > I can record any number of files using this. Each files gets name as
> > > audio1,audio2 ..etc.
>
> > > The problem is afterrecordingthe file I can play it using play
> > > button. But if I exit my application I am not able to see that file
> > > listed in music menu in emulator. But at the same time when i browse
> > > my sdcard using eclipse I can see the recordedaudiofile. ( I have
> > > aleady mounted sdcard image and can see other sdcard content in
> > > emulator)
>
> > > Now if I close the emulator and relaunch it I can see that file in
> > > emulator music menu. Now suppose that file name is audio1.3gp. If I
> > > record a sound using my app it will record it using name audio1.3gp on
> > > same location. This time if I goto music menu I can see audio1.3gp
> > > file with latest recordedaudio.
>
> > > Can anybody help me on why this is happening?
>
> > > Thanks in advance and sorry for long description :).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to