اگه بخوای از یه پوشه مثلا از raw فراخوانی کنی میتونی این کد رو در یه دکمه و در on creat قرار بدی
saveas1(RingtoneManager.TYPE_RINGTONE);
 و کد زیر رو هم بعد از oncreat یعنی خارج از اون ، قرار بدی :
public boolean saveas1(int type) {
byte[] buffer = null;
            InputStream fIn = getBaseContext().getResources().openRawResource(
                    R.raw.zang1);
            int size = 0;
            try {
                size = fIn.available();
                buffer = new byte[size];
                fIn.read(buffer);
                fIn.close();
            } catch (IOException e) {
                return false;
            }
            String path = Environment.getExternalStorageDirectory().getPath(  )
                    + "/media/audio/ringtones/";
            String filename = "zang1.mp3";
            boolean exists = (new File(path)).exists();
            if (!exists) {
                new File(path).mkdirs();
            }
            FileOutputStream save;
            try {
                save = new FileOutputStream(path + filename);
                save.write(buffer);
                save.flush();
                save.close();
            } catch (FileNotFoundException e) {
                return false;
            } catch (IOException e) {
                return false;
            }
            sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
                    Uri.parse("file://" + path + filename)));
            File k = new File(path, filename);
            ContentValues values = new ContentValues();
            values.put(MediaStore.MediaColumns.DATA, k.getAbsolutePath());
            values.put(MediaStore.MediaColumns.TITLE, filename);
            values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
            // This method allows to change Notification and Alarm tone also. Just
            // pass corresponding type as parameter
            if (RingtoneManager.TYPE_RINGTONE == type) {
                values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
            } else if (RingtoneManager.TYPE_NOTIFICATION == type) {
                values.put(MediaStore.Audio.Media.IS_NOTIFICATION, true);
            } else if (RingtoneManager.TYPE_ALARM == type) {
                values.put(MediaStore.Audio.Media.IS_ALARM, true);
            }
            Uri uri = MediaStore.Audio.Media.getContentUriForPath(k
                    .getAbsolutePath());
            Uri newUri = Zang.this.getContentResolver().insert(uri, values);
            RingtoneManager.setActualDefaultRingtoneUri(Zang.t  his, type,
                    newUri);
            // Insert it into the database
            this.getContentResolver()
                    .insert(MediaStore.Audio.Media.getContentUriForPat  h(k
                            .getAbsolutePath()), values);
            return true;
}
حالا بعضی جاها توی این پست سیستم این انجمن خودش فاصله انداخته و نمیشه برداشتشون ! و توی ایکلیپس خطا میده و معلومن ! اونا رو فاصله هاشونو حذف کنید درست میشه
کد تست شده و بدرستی کار میکنه