
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 0.68 KB | hits: 14 | expires: Never
Android ringtone preference - fetch data
if(preferences.getString("ringtonePref", "n/a") != ??)
{
Toast.makeText(TutorialPref.this, "Chosen ringtone: silent", Toast.LENGTH_LONG).show();
}
else if(preferences.getString("ringtonePref", "n/a") != "DEFAULT_RINGTONE_URI" )
{
Toast.makeText(TutorialPref.this, "Chosen ringtone: + default", Toast.LENGTH_LONG).show();
}
String strRingtonePreference = preferences.getString("ringtonePref", "DEFAULT_RINGTONE_URI");
notification.sound = Uri.parse(strRingtonePreference);
Notification notification = new Notification(icon, tickerText, time);