ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, resourcePath);
values.put(MediaStore.MediaColumns.TITLE, (String) ((Button)
v).getText());
values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
values.put(MediaStore.Audio.Media.IS_NOTIFICATION, false);
values.put(MediaStore.Audio.Media.IS_ALARM, false);
values.put(MediaStore.Audio.Media.IS_MUSIC, true);
// Insert it into the database
Uri uri =
MediaStore.Audio.Media.getContentUriForPath(resourcePath);
RingtoneManager.setActualDefaultRingtoneUri(this,
RingtoneManager.TYPE_RINGTONE, uri);
I set a mp3 ringtone (that plays well on my ubuntu and windows) on
samsung galaxy android phone, but it gives a weird sound instead of
the mp3.
Conny
--
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