如何使用原始鈴聲保存mp3文件?使用mp3原始鈴聲
我已經把這個代碼,但不工作:
Uri path = Uri.parse("android.resource://mypack/raw/soundmp3");
RingtoneManager.setActualDefaultRingtoneUri(getApplicationContext(),RingtoneManager.TYPE_RINGTONE,path);
Log.i("TESTT", "Ringtone Set to Resource: " + path.toString());
RingtoneManager.getRingtone(getApplicationContext(), path).play();
我已經在使用權限:
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
可能重複[如何設置鈴聲在Android從我的活動?](http://stackoverflow.com/questions/1271777/how-to-s et-ringtone-in-android-from-my-activity) – m0skit0 2014-09-30 17:50:58