选择铃声RingtoneManager

String uri = null;
            Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
            intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE,
            RingtoneManager.TYPE_NOTIFICATION);
            intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE, "Select Tone");
            if( uri != null)
            {
                 intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
            Uri.parse( uri));
            }

            else
            {
                 intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
            (Uri)null);
            }
startActivityForResult( intent, Set_Ringtone);

 

if (resultCode == RESULT_OK) {
            Uri uri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
            if (uri != null) {
                String ringTonePath = uri.toString();
            }
}

 

你可能感兴趣的:(manager)