Class Feedback

    Definition

    Namespace:
    Tizen.System
    Assembly:
    Tizen.System.Feedback.dll

    The Feedback API provides functions to control haptic and sound. The Feedback API provides the way to play and stop feedback, and get the information whether a specific pattern is supported. Below is the supported pattern string: Tap SoftInputPanel Key0 Key1 Key2 Key3 Key4 Key5 Key6 Key7 Key8 Key9 KeyStar KeySharp KeyBack Hold HardwareKeyPressed HardwareKeyHold Message Email WakeUp Schedule Timer General PowerOn PowerOff ChargerConnected ChargingError FullyCharged LowBattery Lock UnLock VibrationModeAbled SilentModeDisabled BluetoothDeviceConnected BluetoothDeviceDisconnected ListReorder ListSlider VolumeKeyPressed

    public class Feedback
    Inheritance
    object
    Feedback
    Examples
    Feedback feedback = new Feedback();
    bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap");

    Constructors

    View Source

    Feedback()

    Constructor of Feedback class

    Declaration
    public Feedback()
    Remarks

    Initializes a new instance of the Feedback class and prepares the feedback system for use. This constructor initializes the underlying feedback system. It must be called before using any other Feedback methods.

    Examples
    Feedback feedback = new Feedback();

    Methods

    View Source

    ~Feedback()

    Finalizes an instance of the Feedback class.

    Declaration
    protected ~Feedback()
    Remarks

    Finalizes an instance of the Feedback class and releases associated resources. This destructor ensures proper cleanup of the feedback system resources when the Feedback object is no longer needed.

    View Source

    GetCountOfThemeInternal(FeedbackType)

    Gets the number of themes supported as described in the configuration.

    Declaration
    public uint GetCountOfThemeInternal(FeedbackType type)
    Parameters
    Type Name Description
    FeedbackType type

    The feedback type.

    Returns
    Type Description
    uint

    The count of themes can be used according to feedback type.

    Remarks

    This internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. Counts of theme range will be 1 ~ N according to conf file.

    Examples
    Feedback feedback = new Feedback();
    uint countOfTheme = feedback.GetCountOfThemeInternal(FeedbackType.Sound);
    See Also
    FeedbackType
    View Source

    GetThemeIdInternal(FeedbackType)

    Gets the current id of the theme selected from available themes described in the conf file.

    Declaration
    public uint GetThemeIdInternal(FeedbackType type)
    Parameters
    Type Name Description
    FeedbackType type

    The feedback type.

    Returns
    Type Description
    uint

    The id of theme selected as default theme according to feedback type.

    Remarks

    Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. The theme id is positive value as defined in the conf file.

    Examples
    Feedback feedback = new Feedback();
    uint idOfTheme = feedback.GetThemeIdInternal(FeedbackType.Sound);
    See Also
    FeedbackType
    View Source

    GetThemeIdsInternal(FeedbackType)

    Gets the array of theme ids supported described in the conf file.

    Declaration
    public uint[] GetThemeIdsInternal(FeedbackType type)
    Parameters
    Type Name Description
    FeedbackType type

    The feedback type.

    Returns
    Type Description
    uint[]

    The array of theme id supported according to feedback type.

    Remarks

    Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. The theme id is positive value as defined in the conf file. Gets all theme ids as defined in the conf file.

    Examples
    Feedback feedback = new Feedback();
    uint[] getThemeIds = feedback.GetThemeIdsInternal(FeedbackType.Sound);
    See Also
    FeedbackType
    View Source

    IsSupportedPattern(FeedbackType, String)

    Gets the supported information about a specific feedback type and pattern.

    Declaration
    public bool IsSupportedPattern(FeedbackType type, String pattern)
    Parameters
    Type Name Description
    FeedbackType type

    The feedback type.

    String pattern

    The feedback pattern string.

    Returns
    Type Description
    bool

    Information whether a pattern is supported.

    Remarks

    Now, IsSupportedPattern is not working for FeedbackType.All. This API is working for FeedbackType.Sound and FeedbackType.Vibration only. If you use FeedbackType.All for type parameter, this API will throw ArgumentException. To get the supported information for Vibration type, the application should have http://tizen.org/privilege/haptic privilege.

    Examples
    Feedback feedback = new Feedback();
    bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap");
    See Also
    FeedbackType
    View Source

    Play(FeedbackType, String)

    Plays specific type of reactions that are pre-defined feedback pattern.

    Declaration
    public void Play(FeedbackType type, String pattern)
    Parameters
    Type Name Description
    FeedbackType type

    The feedback type.

    String pattern

    The feedback pattern string.

    Remarks

    To play Vibration type, app should have http://tizen.org/privilege/haptic privilege. The pattern must be one of the predefined patterns and supported.

    Examples
    Feedback feedback = new Feedback();
    feedback.Play(FeedbackType.All, "Tap");
    See Also
    FeedbackType
    Stop()
    View Source

    SetThemeIdInternal(FeedbackType, uint)

    Sets the current theme id from available themes described in the conf file.

    Declaration
    public void SetThemeIdInternal(FeedbackType type, uint idOfTheme)
    Parameters
    Type Name Description
    FeedbackType type

    The feedback type.

    uint idOfTheme

    The id of theme will be set.

    Remarks

    Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. To set the id of theme for Sound type, the application should have http://tizen.org/privilege/systemsettings.admin privilege. The theme id is positive value as defined in the conf file.

    Examples
    Feedback feedback = new Feedback();
    uint idOfTheme = 1;
    feedback.SetThemeIdInternal(FeedbackType.Sound, idOfTheme);
    See Also
    FeedbackType
    View Source

    Stop()

    Stops various types of reactions from the feedback module.

    Declaration
    public void Stop()
    Remarks

    To stop vibration, the application should have http://tizen.org/privilege/haptic privilege.

    Examples
    Feedback Feedback1 = new Feedback();
    Feedback1.Stop();
    See Also
    Play(FeedbackType, String)
    View Source

    StopTypeInternal(FeedbackType)

    Stops reactions of various types according to the feedback type.

    Declaration
    public void StopTypeInternal(FeedbackType type)
    Parameters
    Type Name Description
    FeedbackType type

    The feedback type.

    Remarks

    To stop vibration, the application should have http://tizen.org/privilege/haptic privilege.

    Examples
    Feedback Feedback = new Feedback();
    feedback.StopTypeInternal(FeedbackType.Sound);
    feedback.StopTypeInternal(FeedbackType.Vibration);
    See Also
    FeedbackType

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX