Пример #1
0
 /// <summary>
 /// Sets a notification alarm to be triggered after a specific time.
 /// The alarm will first go off delay seconds later and then will go off every certain amount of time defined using period seconds.
 /// </summary>
 /// <param name="delay">The amount of time before the first execution (in seconds).</param>
 /// <param name="standardPeriod"> It can be the <see cref="Tizen.Applications.AlarmStandardPeriod"/>. If then, the period of alarm is guaranteed.</param>
 /// <param name="notification"> The notification to be posted when the alarm is triggered. </param>
 /// <returns> An alarm instance is created with the set param values.</returns>
 /// <exception cref="ArgumentException">Thrown in case of an invalid parameter.</exception>
 /// <exception cref="UnauthorizedAccessException">Thrown in case of a permission denied.</exception>
 /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
 /// <privilege>http://tizen.org/privilege/alarm.set</privilege>
 /// <privilege>http://tizen.org/privilege/notification</privilege>
 /// <since_tizen> 8 </since_tizen>
 public static Alarm CreateAlarm(int delay, AlarmStandardPeriod standardPeriod, Notification notification)
 {
     return(CreateAlarm(delay, (int)standardPeriod, notification));
 }
Пример #2
0
 /// <summary>
 /// Sets an alarm to be triggered after a specific time.
 /// The alarm will first go off delay seconds later and then will go off every certain amount of time defined using standard period seconds.
 /// </summary>
 /// <param name="delay">The amount of time before the first execution (in seconds).</param>
 /// <param name="standardPeriod"> It can be the <see cref="Tizen.Applications.AlarmStandardPeriod"/>. If then, the period of alarm is guaranteed. </param>
 /// <param name="appControl"> The destination AppControl is used to perform a specific task when the alarm is triggered. </param>
 /// <returns> An alarm instance is created with the set param values.</returns>
 /// <exception cref="ArgumentException">Thrown in case of an invalid parameter.</exception>
 /// <exception cref="UnauthorizedAccessException">Thrown in case of a permission denied.</exception>
 /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
 /// <privilege>http://tizen.org/privilege/alarm.set</privilege>
 /// <since_tizen> 8 </since_tizen>
 public static Alarm CreateAlarm(int delay, AlarmStandardPeriod standardPeriod, AppControl appControl)
 {
     return(CreateAlarm(delay, (int)standardPeriod, appControl));
 }