2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
3 <!-- This component and the accompanying materials are made available under the terms of the License |
3 <!-- This component and the accompanying materials are made available under the terms of the License |
4 "Eclipse Public License v1.0" which accompanies this distribution, |
4 "Eclipse Public License v1.0" which accompanies this distribution, |
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
6 <!-- Initial Contributors: |
6 <!-- Initial Contributors: |
7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-581A8E4B-12BE-41C0-A20E-3087A80FEECF" xml:lang="en"><title>Tactile |
9 --> |
10 feedback</title><prolog><metadata><keywords></keywords></metadata></prolog><conbody> |
10 <!DOCTYPE concept |
11 <p>There are two types of cases where vibration or audio of the |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 device is used as an output method when the user is interacting with the device |
12 <concept id="GUID-581A8E4B-12BE-41C0-A20E-3087A80FEECF" xml:lang="en"><title>Tactile |
13 touch screen:</p> |
13 feedback</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>There are two methods where vibration or audio of the device is used as |
|
15 an output method (when mobile device users interact with the device touch |
|
16 screen):</p> |
14 <ul> |
17 <ul> |
15 <li><p>When the user has touched an active area of the screen, and an action |
18 <li><p>As a <i>tacticon</i> to inform users through physical feedback, that |
16 will be triggered on touch release</p></li> |
19 an important event is occurring in the device. For example, when a new message |
17 <li><p>Interaction with given components has been successful</p></li> |
20 arrives or a warning note is displayed.</p></li> |
|
21 <li><p>As <i>tactile feedback</i> to indicate to the user that an interaction |
|
22 event has been successful. For example, users receive tactile feedback when |
|
23 they press a button on the touch screen.</p></li> |
18 </ul> |
24 </ul> |
19 <p>As with sounds, tactile feedback must be used carefully so as not to desensitize |
25 <p>As with sounds, tactile feedback must be used carefully so as not to desensitize |
20 the user to the vibration: the attention grabbing quality remains and functions |
26 the user to the vibration; the attention grabbing quality remains and functions |
21 so long as the feedback is not too frequent.</p> |
27 so long as the feedback is not too frequent.</p> |
22 <p>Tactile feedback is included in those common UI components, where seen |
28 <p>Tactile feedback is enabled for all the Symbian platform UI components. |
23 as beneficial. When new components are designed, tactile feedback is to be |
29 Tactile feedback can be disabled for the common UI components in an application. |
24 included in those if seen beneficial usability-wise. For example, in any button |
30 However, this is acceptable only if tactile feedback causes interference with |
25 type of UI component the tactile feedback is natural. Application can disable |
31 other device functions.</p> |
26 tactile feedback from the common UI components it uses, if seen necessary. |
32 <p>The user can choose the level of tactile feedback and turn tacticons ON |
27 This is acceptable only in cases, where tactile feedback would cause interference, |
33 and OFF.</p> |
28 like during a phone call or when giving audio commands to the system.</p> |
34 <p>The following table lists the tactile feedback effects:</p> |
29 <p>The user can choose whether tactile feedback is on or off.</p> |
35 <p><table id="GUID-4969AEA7-3BE4-4644-8232-1FA26D49010B"><title>Tactile feedback |
30 <section id="GUID-6F2398F3-DA71-4330-A63A-15F02D7533DF"><title>Characteristics |
36 effects</title> |
|
37 <tgroup cols="2"><colspec colname="col1" colwidth="0.40*"/><colspec colname="col2" colwidth="1.60*"/> |
|
38 <thead> |
|
39 <row> |
|
40 <entry valign="top"><p>Effects</p></entry> |
|
41 <entry valign="top"><p>Description</p></entry> |
|
42 </row> |
|
43 </thead> |
|
44 <tbody> |
|
45 <row> |
|
46 <entry><p><b>Sensitive button</b></p></entry> |
|
47 <entry><p>It provides single pulse effect on repeated key presses with buttons. |
|
48 It is also possible with other similar components.</p></entry> |
|
49 </row> |
|
50 <row> |
|
51 <entry><p><b>Basic button</b></p></entry> |
|
52 <entry><p>It provides stronger single pulse effect to buttons. It is also |
|
53 possible with other similar components.</p></entry> |
|
54 </row> |
|
55 <row> |
|
56 <entry><p><b>Sensitive list</b></p></entry> |
|
57 <entry><p>It provides single pulse effect to lists and grids. Effect is used |
|
58 with move (drag and flick) when new item appears on the screen.</p></entry> |
|
59 </row> |
|
60 <row> |
|
61 <entry><p><b>Basic list</b></p></entry> |
|
62 <entry><p>It provides stronger single pulse effect to lists and grids. Effect |
|
63 is used with touch down and release when tap makes an action. </p><p>In hierarchical |
|
64 list, collapsing/expanding item provides basic list effect with touch down |
|
65 and release.</p></entry> |
|
66 </row> |
|
67 <row> |
|
68 <entry><p><b>Bounce effect</b></p></entry> |
|
69 <entry><p>It provides pulse effect when list returns to its normal state after |
|
70 boundary effect.</p></entry> |
|
71 </row> |
|
72 <row> |
|
73 <entry><p><b>Sensitive slider</b></p></entry> |
|
74 <entry><p>It provides pulse effect with scrollbar and slider thumbs. Effect |
|
75 is provided with touch down and release in thumb area.</p></entry> |
|
76 </row> |
|
77 <row> |
|
78 <entry><p><b>Smooth slider</b></p></entry> |
|
79 <entry><p>It provides continuous smooth feedback when dragging scrollbar or |
|
80 slider thumb. This can also be increasing or decreasing depending of the slider |
|
81 type.</p></entry> |
|
82 </row> |
|
83 <row> |
|
84 <entry><p><b>Hold slider</b></p></entry> |
|
85 <entry><p>It provides sensitive pulse effect when touch down and hold on the |
|
86 slider or scrollbar area. Slider thumb starts moving step by step towards |
|
87 the touch point. Every step gives one sensitive pulse. If slider thumb moves |
|
88 directly to the touch point, then basic slider effect is provided.</p></entry> |
|
89 </row> |
|
90 <row> |
|
91 <entry><p><b>Pop-up</b></p></entry> |
|
92 <entry><p>It provides sensitive pulse effect when pop-up is opened or closed. |
|
93 If the theme animations are ON, then pop-up effect is used with opening event |
|
94 after increasing long touch effect. In this scenario, there is no pop-up effect |
|
95 while closing. <note> All pop-ups does not have theme animation.</note></p></entry> |
|
96 </row> |
|
97 <row> |
|
98 <entry><p><b>Pop-up close</b></p></entry> |
|
99 <entry><p>It provides decreasing smooth feedback while closing pop-up and |
|
100 when theme animations are ON.</p></entry> |
|
101 </row> |
|
102 <row> |
|
103 <entry><p><b>Increasing long touch</b></p></entry> |
|
104 <entry><p>It provides increasing smooth feedback. This can be used with either |
|
105 long tap animation or pop-up opening theme effects. If the theme effects are |
|
106 ON and long tap opens a pop-up, then feedback is provided only with long tap. |
|
107 This is followed by pop-up.</p></entry> |
|
108 </row> |
|
109 <row> |
|
110 <entry><p><b>Basic tab</b></p></entry> |
|
111 <entry><p>It provides strong pulse effect with touch down event in tab area.</p></entry> |
|
112 </row> |
|
113 <row> |
|
114 <entry><p><b>Smooth flick</b></p></entry> |
|
115 <entry><p>It provides smooth feedback with drag when horizontal movement is |
|
116 possible.</p></entry> |
|
117 </row> |
|
118 <row> |
|
119 <entry><p><b>Sensitive flick</b></p></entry> |
|
120 <entry><p>It provides sensitive pulse effect with touch release when horizontal |
|
121 movement is possible.</p></entry> |
|
122 </row> |
|
123 <row> |
|
124 <entry><p><b>Sensitive edit</b></p></entry> |
|
125 <entry><p>It provides sensitive pulse effect in editors with touch down and |
|
126 release.</p></entry> |
|
127 </row> |
|
128 <row> |
|
129 <entry><p><b>Text edit</b></p></entry> |
|
130 <entry><p>It provides pulse effect when painting the text. Effect is provided |
|
131 with every character while painting the text.</p></entry> |
|
132 </row> |
|
133 <row> |
|
134 <entry><p><b>Blank edit</b></p></entry> |
|
135 <entry><p>It provides pulse effect when painting blank character. By default, |
|
136 it is none.</p></entry> |
|
137 </row> |
|
138 <row> |
|
139 <entry><p><b>Line edit</b></p></entry> |
|
140 <entry><p>It provides pulse effect when painting a line.</p></entry> |
|
141 </row> |
|
142 <row> |
|
143 <entry><p><b>Empty line</b></p></entry> |
|
144 <entry><p>It provides pulse effect when painting an empty line. By default, |
|
145 it is none.</p></entry> |
|
146 </row> |
|
147 <row> |
|
148 <entry><p><b>Check box</b></p></entry> |
|
149 <entry><p>It provides pulse effect when marking/unmarking a check box.</p></entry> |
|
150 </row> |
|
151 <row> |
|
152 <entry><p><b>Multi-touch recognition</b></p></entry> |
|
153 <entry><p>It provides double pulse (sensitive + sensitive) effect when multi-touch |
|
154 is recognized (generally, when second finger is touched down).</p></entry> |
|
155 </row> |
|
156 <row> |
|
157 <entry><p><b>Smooth pinch</b></p></entry> |
|
158 <entry><p>It provides smooth continuous feedback while moving fingers in multi-touch |
|
159 pinch situation.</p></entry> |
|
160 </row> |
|
161 <row> |
|
162 <entry><p><b>Smooth rotate</b></p></entry> |
|
163 <entry><p>It provides smooth continuous feedback while moving fingers in |
|
164 multi-touch rotate situation.</p></entry> |
|
165 </row> |
|
166 </tbody> |
|
167 </tgroup> |
|
168 </table></p> |
|
169 <section id="GUID-B9A35CA3-B830-4D97-9B0A-E22DC4A3CDA1"><title>Characteristics |
31 of haptics related APIs</title><p>You can use the following APIs to create |
170 of haptics related APIs</title><p>You can use the following APIs to create |
32 haptic effects:</p><ul> |
171 haptic effects:</p><ul> |
33 <li><p>Tactile |
172 <li><p><xref href="GUID-8661A7E0-F19A-41F8-9062-FBFAE70CF658.dita">Tactile Feedback |
34 Feedback Client API</p><ul> |
173 Client API</xref></p><ul> |
35 <li><p>available from S60 5.0 onwards</p></li> |
174 <li><p>It is available from S60 5th Edition onwards</p></li> |
36 <li><p>can be used on all S60 5.0 or later mobile devices but the feedback |
175 <li><p>It can be used on all S60 5th Edition or later mobile devices. However, |
37 is played only on touch enabled layouts</p></li> |
176 the feedback is played only on touch enabled layouts.</p></li> |
38 <li><p>provides simple functions for triggering various predefined tactile |
177 <li><p>It provides simple functions for triggering various predefined tactile |
39 feedback (vibration or audio) effects</p></li> |
178 feedback (vibration or audio) effects.</p></li> |
40 <li><p>enables a consistent user experience in all applications of the mobile |
179 <li><p>It enables a consistent user experience in all applications of the |
41 device (an application gives a logical feedback type as an input and the actual |
180 mobile device (an application gives a logical feedback type as an input and |
42 physical effect depends on the mobile device configuration and end user settings)</p></li> |
181 the actual physical effect depends on the mobile device configuration and |
43 <li><p>when the area feedback is used, latency is the smallest for the feedback |
182 end user settings).</p></li> |
44 triggering (tactile feedback can be triggered at the window server level before |
183 <li><p>When the area feedback is used, latency is low for the feedback triggering |
45 the corresponding pointer event is delivered to the visible application)</p></li> |
184 (a tactile feedback can already be triggered at the window server level prior |
46 <li><p>direct feedback is easy to integrate into <codeph>HandlePointerEventL</codeph> code </p></li> |
185 to the corresponding pointer event being delivered to the visible application).</p></li> |
47 <li><p>an application can select the logical tactile feedback from certain |
186 <li><p>Direct feedback can be easily integrated into <codeph>CCoeControl::HandlePointerEventL()</codeph> . </p></li> |
48 types and the produced effect may be different on various mobile devices</p></li> |
187 <li><p>An application can select the logical tactile feedback from certain |
|
188 types. The produced effect may be different on various mobile devices.</p></li> |
49 </ul></li> |
189 </ul></li> |
50 <li><p>Vibra |
190 <li><p><xref href="jar:GUID-558A5A9B-811E-4A87-B3DD-AE734C9AA966.jar!/public_specs/GuidesA/Haptics_API_Specification/Haptics_API_Specification.html" format="application/java-archive">Haptics |
51 API</p><ul> |
191 API</xref></p><ul> |
52 <li><p>available from S60 3.0 onwards</p></li> |
192 <li><p>It is available from S60 5.2 Edition onwards.</p></li> |
53 <li><p>can be used for running device vibrator with given intensity for given |
193 <li><p>It can be used in touch and hybrid mobile devices.</p></li> |
54 period of time</p></li> |
194 <li><p>It provides an interface for accessing Haptics player that can control |
55 <li><p>a privileged client application can use this for playing pulse effects |
195 different actuator types.</p></li> |
56 which have a really short duration (as the ones used for tactile feedback)</p></li> |
196 <li><p>It enables producing of complex vibrator effects, such as an explosion |
|
197 or machine gun effect in a game, bass boost for a music player, advanced ringing |
|
198 tone vibration, and so on.</p></li> |
|
199 <li><p>It enables simultaneous playing of different kinds of basis effects |
|
200 and modifying them when played. </p></li> |
|
201 <li><p>It allows for designing complex effects (using a separate PC application) |
|
202 that can be loaded on Haptics player for playing.</p></li> |
|
203 <li><p>It may require a special license key for third-party applications |
|
204 (to be set at runtime) to enable the Haptics player functionality.</p></li> |
|
205 </ul></li> |
|
206 <li><p><xref href="GUID-D53A00E4-CF37-5F11-8D15-C5ECCCE64597.dita">Vibra API</xref></p><ul> |
|
207 <li><p>It available from S60 3.0 onwards</p></li> |
|
208 <li><p>It can be used for running device vibrator with given intensity for |
|
209 a given period of time</p></li> |
|
210 <li><p>It can be used by a privileged client application to play pulse effects, |
|
211 which have a very short duration (as the ones used for tactile feedback)</p></li> |
57 </ul></li> |
212 </ul></li> |
58 </ul></section> |
213 </ul></section> |
59 <section id="GUID-8D08AB75-2E24-44B6-88B6-4AE1CEBD70F7"><title>When to use |
214 <section id="GUID-428F693C-1CA8-4588-9A7D-C4265D2AED91"><title>When to use |
60 Tactile Feedback Client API and Vibra API</title><p>You should use<ul> |
215 Tactile Feedback Client API, Haptics API, and Vibra API</title><p>You must |
|
216 use<ul> |
61 <li><p>Tactile Feedback Client API for providing tactile feedback in custom |
217 <li><p>Tactile Feedback Client API for providing tactile feedback in custom |
62 controls (grids, lists, etc.) which comply with the style of the Core UI components |
218 controls (grids, lists, and so on) which will comply with the style of Core |
63 to ensure a uniform user experience among applications</p></li> |
219 UI components to ensure a uniform user experience among applications</p></li> |
64 <li><p>Vibra API to produce haptic effects such as ringing tone vibration</p></li> |
220 <li><p>Haptics API on touch and hybrid mobile devices for producing complex |
|
221 vibration feedback which cannot be achieved with Tactile Framework (games, |
|
222 simulations, demos, and so on.)</p></li> |
|
223 <li><p>Vibra API for producing haptic effects such as ringing tone vibration |
|
224 in those mobile devices where Haptics API is not available or functional</p></li> |
65 </ul></p></section> |
225 </ul></p></section> |
66 <section id="GUID-4003A7DC-0208-4436-B9A1-688D57149F6A"><title>Using |
226 <section id="GUID-8334E102-8F04-4726-9CD2-1D8004A417E1"><title>Using |
67 tactile feedback in C++ applications</title><p>The API to use for tactile |
227 tactile feedback in C++ applications</title><p>The API to use for tactile |
68 feedback is the <xref href="GUID-8661A7E0-F19A-41F8-9062-FBFAE70CF658.dita">Tactile |
228 feedback is the <xref href="GUID-8661A7E0-F19A-41F8-9062-FBFAE70CF658.dita">Tactile |
69 feedback client API</xref>.</p><p>The Symbian platform includes a tactile |
229 feedback client API</xref>.</p><p>The Symbian platform includes a tactile |
70 feedback interface to add, modify and remove feedback areas in the registry. |
230 feedback interface to add, modify and remove feedback areas in the registry. |
71 There is also an option to trigger direct feedback and bypass the registry. |
231 There is also an option to trigger direct feedback and bypass the registry. |
72 <parmname>MTouchFeedback::Instance()</parmname> is used for acquiring a pointer |
232 <parmname>MTouchFeedback::Instance()</parmname> is used for acquiring a pointer |
73 to a touch feedback instance. When touch feedback is activated, the mobile |
233 to a touch feedback instance. When touch feedback is activated, the mobile |
74 device users get a slight vibration when the control with the feedback interface |
234 device users get a slight vibration when the control with the feedback interface |
75 is touched. </p><note><p>Tactile feedback can be set be disabled in a client |
235 is touched. </p><note><p>Tactile feedback can be set and disabled in a client |
76 application or a mobile device in some situations, for example, during phone |
236 application or a mobile device in some scenarios, for example, during phone |
77 calls.</p></note><p>Client applications cannot determine the actual physical |
237 calls.</p></note><p>Client applications cannot determine the actual physical |
78 feedback that is generated. It depends on device configuration and current |
238 feedback that is generated. It depends on device configuration and current |
79 settings. In current devices, the user changeable settings include vibration |
239 settings. In current devices, the user changeable settings include vibration |
80 and audio feedback intensity level.</p><p>In your application, you can use |
240 and audio feedback intensity level.</p><p>In your application, you can use |
81 the following feedback types, defined in <codeph>TTouchLogicalFeedback</codeph>:</p><table id="GUID-6FF24F72-C352-4027-AA5D-2D34EBFA00F4"> |
241 the following feedback types, defined in <codeph>TTouchLogicalFeedback</codeph>:</p><table id="GUID-6FF24F72-C352-4027-AA5D-2D34EBFA00F4"> |
82 <tgroup cols="2"><colspec colname="col1"></colspec><colspec colname="col2"></colspec> |
242 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
83 <tbody> |
243 <tbody> |
84 <row> |
244 <row> |
85 <entry><p><codeph>ETouchFeedbackNone</codeph></p></entry> |
245 <entry><p><codeph>ETouchFeedbackNone</codeph></p></entry> |
86 <entry><p>Use for disabling feedback for some areas of the application window |
246 <entry><p>It is used for disabling feedback in some areas of the application |
87 when using the area registry.</p></entry> |
247 window while using the area registry.</p></entry> |
88 </row> |
248 </row> |
89 <row> |
249 <row> |
90 <entry><p><codeph>ETouchFeedbackBasic</codeph></p></entry> |
250 <entry><p><codeph>ETouchFeedbackBasic</codeph></p></entry> |
91 <entry><p>Use as default feedback for stylus down events, for example, when |
251 <entry><p>It is used as a default feedback for stylus touch down events. For |
92 the mobile device user taps a button or tab.</p></entry> |
252 example, when the mobile device user taps a button or tab.</p></entry> |
93 </row> |
253 </row> |
94 <row> |
254 <row> |
95 <entry><p><codeph>ETouchFeedbackSensitive</codeph></p></entry> |
255 <entry><p><codeph>ETouchFeedbackSensitive</codeph></p></entry> |
96 <entry><p>Sensitive feedback for situations where the triggering action is |
256 <entry><p>It provides sensitive feedback in situations when:<ul> |
97 not very important (e.g. change of focus in a list), or when there can be |
257 <li><p>the triggering action is not very important (for example, change of |
98 a large number of feedback instances within a short time (e.g. text selection |
258 focus in a list)</p></li> |
99 which gives feedback on every new selected character). Also used for scrolling |
259 <li><p>there can be a large number of feedback instances within a short time |
100 and dragging.</p></entry> |
260 (for example, text selection which gives feedback on every new selected character).</p></li> |
|
261 </ul> It is also used for scrolling and dragging.</p></entry> |
101 </row> |
262 </row> |
102 </tbody> |
263 </tbody> |
103 </tgroup> |
264 </tgroup> |
104 </table><p>To use vibration or audio feedback in your application:</p><ol> |
265 </table><p>To use vibration or audio feedback in your application:</p><ol> |
105 <li id="GUID-791E80D6-6935-4202-81E0-BA7392A9E1B3"><p>Include <codeph>touchfeedback.lib</codeph> in |
266 <li id="GUID-791E80D6-6935-4202-81E0-BA7392A9E1B3"><p>Include <codeph>touchfeedback.lib</codeph> in |