Finally was able to find an example.  Thank the Lord for smart people
http://groups.google.com/group/android-developers/browse_thread/thread/fc05ace7d76dff62


On Sep 27, 2:52 pm, erik wagner <erik.j.wag...@gmail.com> wrote:
> Whoops, the Uri newUri line should have 'aUri' in the
> getContentResolver().insert portion.  My editing mistake, only
> correcting so there's no confusion on anyone trying to follow it.
> Thanks.
>
> On Sep 27, 12:49 pm, erik wagner <erik.j.wag...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
> > I'm trying to add a ringtone to the ringtone picker and am having a
> > tough go of it.  I am working off this example (http://
> > groups.google.com/group/android-developers/browse_thread/thread/
> > b5590a1551e4f97d) but cannot seem to get it to work.
> > Any help would be greatly appreciated.  Thanks.
> > (my code is probably all over the place at this point)
> > myContentValues.put(MediaStore.MediaColumns.DATA,
> > getString(R.raw.asound));
> > myContentValues.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
> > myContentValues.put(MediaStore.MediaColumns.TITLE, "A Sound");
>
> > I've left the other entries off since those seem to be pretty easy, is
> > that the correct format of the DATA portion?  The audio file is an mp3
> > in the res/raw folder.  It is set as a ringtone
>
> > including the rest of (what I think is) the relevant code,
>
> > Uri aUri =
> > MediaStore.Audio.Media.getContentUriForPath(getString(R.raw.asound));
> > Uri newUri = getContentResolver().insert(fearUri, myContentValues);
> > RingtoneManager.setActualDefaultRingtoneUri(myContext,
> > RingtoneManager.TYPE_RINGTONE, newUri);
>
> > So I guess I have several questions...
> > 1. Is there anything plainly wrong with the myContentValues
> > statements?
> > 2. When the ringtone picker is brought up should the title show up (in
> > this case "A Sound") or will it remain listed as 'default ringtone'?
> > 3. If there is a sample project online that does this that anyone
> > knows about (I looked through all the sample stuff but didn't see
> > anything, I could have easily missed it though) feel free to include
> > that.
>
> > Thanks in advance.

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