I actually haven't tried it in code yet, but wouldn't something like
the android.media.MediaScannerConnection class be helpful here:
    
http://code.google.com/android/reference/android/media/MediaScannerConnection.html
?

>From what I read, it looks like it automates the process that you're
trying to do manually here (but will make sure that all the right
fields are put into the right tables....)

D


On Nov 27, 9:47 pm, Ilan <[EMAIL PROTECTED]> wrote:
> I actually found some kind of solution:
>
> I've added MediaStore.Audio.Media.DATA with the path to the file and
> that sort part of the problem, now I can't add the new file to the
> other lists (Album / Artists) unless I'm rebooting the device. I'll
> appreciate any help with this one...
>
> On Nov 26, 11:22 am, Ilan <[EMAIL PROTECTED]> wrote:
>
> > Any luck with this one?
>
> > I realy need it to be an MP3 file
>
> > On Nov 13, 12:53 am, Thustle <[EMAIL PROTECTED]> wrote:
>
> > > Thanks for the workaround Ernest.
>
> > > I'll try that for now and hope that a true solution presents itself
> > > soon.
>
> > > Dave
>
> > > On 12 Nov, 19:57, Ernesto <[EMAIL PROTECTED]> wrote:
>
> > > > Hello Dave,
>
> > > > I haven't found the solution yet, so I store the mp3s as video, using
> > > > the MediaStore.Video URI. As I see the only difference, that the mp3s
> > > > stored as 3gp, but works perfectly.
>
> > > > Br,
> > > > Ernest
>
> > > > On Nov 11, 12:29 pm, Thustle <[EMAIL PROTECTED]> wrote:
>
> > > > > I am getting exactly the same problem. I've added
> > > > > TITLE,TRACK,MIME_TYPE,SIZE,ARTIST,DATE_ADDED and DISPLAY_NAME to the
> > > > > list of content values when trying to create the record, but it still
> > > > > returns null and I still get the
>
> > > > > android.database.sqlite.SQLiteConstraintException:errorcode19
>
> > > > >error.
>
> > > > > Ernest: Did you manage to find out what was wrong?
>
> > > > > Can anyone out there help?
>
> > > > > Many thanks,
> > > > > Dave

--~--~---------~--~----~------------~-------~--~----~
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