Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.68 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Android ringtone preference - fetch data
  2. if(preferences.getString("ringtonePref", "n/a") != ??)
  3.             {
  4.                 Toast.makeText(TutorialPref.this,   "Chosen ringtone: silent", Toast.LENGTH_LONG).show();
  5.             }
  6.             else if(preferences.getString("ringtonePref", "n/a") != "DEFAULT_RINGTONE_URI" )
  7.             {
  8.                 Toast.makeText(TutorialPref.this,   "Chosen ringtone: + default", Toast.LENGTH_LONG).show();
  9.             }
  10.        
  11. String strRingtonePreference = preferences.getString("ringtonePref", "DEFAULT_RINGTONE_URI");
  12. notification.sound = Uri.parse(strRingtonePreference);
  13.        
  14. Notification notification = new Notification(icon, tickerText, time);