Например так.
ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, <<asbolutePathToYourAudioFileHere>>);
values.put(MediaStore.MediaColumns.TITLE, "<<yourRingToneNameHere>>");
values.put(MediaStore.MediaColumns.SIZE, k);
values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mpeg"); // assuming it's an mpeg, of course
values.put(MediaStore.Audio.Media.ARTIST, "<<yourArtistNameHere>>");
// values.put(MediaStore.Audio.Media.DURATION, duration); // doesn't appear to be necessary if you don't know
values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
Uri uri = MediaStore.Audio.Media.getContentUriForPath(outPath);
Uri newUri = getContentResolver().insert(uri, values);
RingtoneManager.setActualDefaultRingtoneUri(
<<MyActivity>>.this,
RingtoneManager.TYPE_RINGTONE,
newUri);
Нашел вот тут
stackoverflow.com/a/1287415