List of usage examples for android.provider AlarmClock EXTRA_RINGTONE
String EXTRA_RINGTONE
To view the source code for android.provider AlarmClock EXTRA_RINGTONE.
Click Source Link
From source file:com.ephemeraldreams.gallyshuttle.ui.ScheduleActivity.java
/** * Build an alarm intent to pass to other activities or alarm applications. * * @param hour Alarm hour to set./*from w ww . j a v a 2s. c om*/ * @param minute Alarm minute to set * @return Alarm intent. */ private Intent buildAlarmIntent(int hour, int minute) { Intent alarmIntent = new Intent(AlarmClock.ACTION_SET_ALARM); CharSequence station = scheduleViewPager.getAdapter().getPageTitle(scheduleViewPager.getCurrentItem()); alarmIntent.putExtra(AlarmClock.EXTRA_MESSAGE, station + " arrival reminder."); alarmIntent.putExtra(AlarmClock.EXTRA_SKIP_UI, false); alarmIntent.putExtra(AlarmClock.EXTRA_HOUR, hour); alarmIntent.putExtra(AlarmClock.EXTRA_MINUTES, minute); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { alarmIntent.putExtra(AlarmClock.EXTRA_VIBRATE, alarmVibrationBooleanPreference.get()); if (TextUtils.isEmpty(alarmRingtoneChoiceStringPreference.get())) { alarmIntent.putExtra(AlarmClock.VALUE_RINGTONE_SILENT, true); } else { alarmIntent.putExtra(AlarmClock.EXTRA_RINGTONE, alarmRingtoneChoiceStringPreference.get()); } } return alarmIntent; }