Class Feedback
Definition
- Namespace:
- Tizen.System
- Assembly:
- Tizen.System.Feedback.dll
- API Level:
- 3
- Privilege Level:
- public
- Privilege:
- For controlling the haptic device: http://tizen.org/privilege/haptic For controlling the sound, privilege is not needed.
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
C#Copypublic class Feedback : object
- Inheritance
-
Feedback
Examples
CopyFeedback feedback = new Feedback(); bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap");
Constructors
Declaration
C#Copypublic Feedback()
Examples
CopyFeedback feedback = new Feedback();
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/haptic
Feature: http://tizen.org/feature/feedback.vibration for FeedbackType.Vibration
Methods
Declaration
C#Copyprotected void Finalize()
GetCountOfThemeInternal(FeedbackType)
Gets the count of theme can be used according to feedback type.
Declaration
C#Copypublic uint GetCountOfThemeInternal(FeedbackType type)
Parameters
Type | Name | Description |
---|---|---|
FeedbackType | type | The feedback type. |
Returns
Type | Description |
---|---|
UInt32 | The counf of theme can be used according to feedback type. |
Remarks
Now 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
CopyFeedback feedback = new Feedback(); uint coundOfTheme = feedback.GetCountOfThemeInternal(FeedbackType.Sound);
API Level: 10
Declaration
C#Copypublic uint GetThemeIdInternal(FeedbackType type)
Parameters
Type | Name | Description |
---|---|---|
FeedbackType | type | The feedback type. |
Returns
Type | Description |
---|---|
UInt32 | 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
CopyFeedback feedback = new Feedback(); uint idOfTheme = feedback.GetThemeIdInternal(FeedbackType.Sound);
API Level: 10
Declaration
C#Copypublic uint[] GetThemeIdsInternal(FeedbackType type)
Parameters
Type | Name | Description |
---|---|---|
FeedbackType | type | The feedback type. |
Returns
Type | Description |
---|---|
UInt32[] | 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.
Examples
CopyFeedback feedback = new Feedback(); uint[] getThemeIds = feedback.GetThemeIdsInternal(FeedbackType.Sound);
API Level: 10
IsSupportedPattern(FeedbackType, String)
Gets the supported information about a specific type and pattern.
Declaration
C#Copypublic bool IsSupportedPattern(FeedbackType type, String pattern)
Parameters
Type | Name | Description |
---|---|---|
FeedbackType | type | The feedback type. |
String | pattern | The feedback pattern string. |
Returns
Type | Description |
---|---|
Boolean | 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
CopyFeedback feedback = new Feedback(); bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap");
API Level: 3
Privilege Level: public
Privilege: For controlling the haptic device: http://tizen.org/privilege/haptic For controlling the sound, privilege is not needed.
Declaration
C#Copypublic 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.
Examples
CopyFeedback feedback = new Feedback(); feedback.Play(FeedbackType.All, "Tap");
API Level: 3
Privilege Level: public
Privilege: For controlling the haptic device: http://tizen.org/privilege/haptic For controlling the sound, privilege is not needed.
SetThemeIdInternal(FeedbackType, UInt32)
Sets the id of theme according to feedback type.
Declaration
C#Copypublic void SetThemeIdInternal(FeedbackType type, uint idOfTheme)
Parameters
Type | Name | Description |
---|---|---|
FeedbackType | type | The feedback type. |
UInt32 | 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
CopyFeedback feedback = new Feedback(); uint idOfTheme = 1; feedback.SetThemeIdInternal(FeedbackType.Sound, idOfTheme);
API Level: 10
Declaration
C#Copypublic void Stop()
Remarks
To stop vibration, the application should have http://tizen.org/privilege/haptic privilege.
Examples
CopyFeedback Feedback1 = new Feedback(); Feedback1.Stop();
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/haptic
Feature: http://tizen.org/feature/feedback.vibration
Declaration
C#Copypublic 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
CopyFeedback Feedback = new Feedback(); feedback.StopTypeInternal(FeedbackType.Sound); feedback.StopTypeInternal(FeedbackType.Vibration);