Code example for RingtonePreference

Methods: setSummary

0
			//SharedPreferences preference = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); 
			 
			String strRingtonePreference = sharedPreferences.getString("ringtone", "DEFAULT_SOUND");
			tone = Uri.parse(strRingtonePreference);
			Ringtone note = RingtoneManager.getRingtone(getApplicationContext(), tone);
			pref.setSummary(note.getTitle(getBaseContext()));
			 
		} 
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java