2 * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 namespace Tizen.Applications.Notifications
22 /// Class containing common properties and methods of Notifications
25 /// A notification is a message that is displayed on the notification area.
26 /// It is created to notify information to the user through the application.
27 /// This class helps you to provide method and property for creating notification object.
29 public sealed partial class Notification
32 /// Class for Notification AccessorySet which is included vibration, led, sound option
34 public sealed class AccessorySet : MakerBase
37 /// Gets or sets the sound option. Default to AccessoryOption.Off.
40 /// If you set AccessoryOption.Custom and not set SoundPath, then turn on the default sound.
42 public AccessoryOption SoundOption { get; set; } = AccessoryOption.Off;
45 /// Gets or sets the sound path, It will play on the sound file you set.
47 public string SoundPath { get; set; }
50 /// Gets or sets a value indicating whether vibration is operated. Default to false.
52 public bool CanVibrate { get; set; } = false;
55 /// Gets or sets the led option. Default to AccessoryOption.Off.
58 /// If you set AccessoryOption.Custom and not set LedColor, then turn on the LED with default color.
60 public AccessoryOption LedOption { get; set; } = AccessoryOption.Off;
63 /// Gets or sets the led on time period that you would like the LED on the device to blink. as well as the rate
66 /// Default value of LedOnMillisecond is 0.
67 /// The rate is specified in terms of the number of Milliseconds to be on.
68 /// You should always set LedOnMillisecond with LedOffMillisecond. Otherwise, it may not operate normally.
70 public int LedOnMillisecond { get; set; }
73 /// Gets or sets the led on time period that you would like the LED on the device to blink. as well as the rate.
76 /// The rate is specified in terms of the number of Milliseconds to be off.
77 /// You should always set LedOffMillisecond with LedOnMillisecond. Otherwise, it may not operate normally.
79 public int LedOffMillisecond { get; set; }
82 /// Gets or sets the led color that you would like the LED on the device to blink.
85 /// If you want to set LedColor, you should always set LedOption is AccessoryOption.Custom. Otherwise, it may operate default led color.
87 public Color LedColor { get; set; }
89 internal override void Make(Notification notification)
91 AccessorySetBinder.BindObject(notification);