diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-581A8E4B-12BE-41C0-A20E-3087A80FEECF.dita --- a/Symbian3/SDK/Source/GUID-581A8E4B-12BE-41C0-A20E-3087A80FEECF.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-581A8E4B-12BE-41C0-A20E-3087A80FEECF.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,298 +1,253 @@ - - - - - -Tactile -feedback -

There are two methods where vibration or audio of the device is used as -an output method (when mobile device users interact with the device touch -screen):

- -

As with sounds, tactile feedback must be used carefully so as not to desensitize -the user to the vibration; the attention grabbing quality remains and functions -so long as the feedback is not too frequent.

-

Tactile feedback is enabled for all the Symbian platform UI components. -Tactile feedback can be disabled for the common UI components in an application. -However, this is acceptable only if tactile feedback causes interference with -other device functions.

-

The user can choose the level of tactile feedback and turn tacticons ON -and OFF.

-

The following table lists the tactile feedback effects:

-

Tactile feedback -effects - - - -

Effects

-

Description

-
- - - -

Sensitive button

-

It provides single pulse effect on repeated key presses with buttons. -It is also possible with other similar components.

-
- -

Basic button

-

It provides stronger single pulse effect to buttons. It is also -possible with other similar components.

-
- -

Sensitive list

-

It provides single pulse effect to lists and grids. Effect is used -with move (drag and flick) when new item appears on the screen.

-
- -

Basic list

-

It provides stronger single pulse effect to lists and grids. Effect -is used with touch down and release when tap makes an action.

In hierarchical -list, collapsing/expanding item provides basic list effect with touch down -and release.

-
- -

Bounce effect

-

It provides pulse effect when list returns to its normal state after -boundary effect.

-
- -

Sensitive slider

-

It provides pulse effect with scrollbar and slider thumbs. Effect -is provided with touch down and release in thumb area.

-
- -

Smooth slider

-

It provides continuous smooth feedback when dragging scrollbar or -slider thumb. This can also be increasing or decreasing depending of the slider -type.

-
- -

Hold slider

-

It provides sensitive pulse effect when touch down and hold on the -slider or scrollbar area. Slider thumb starts moving step by step towards -the touch point. Every step gives one sensitive pulse. If slider thumb moves -directly to the touch point, then basic slider effect is provided.

-
- -

Pop-up

-

It provides sensitive pulse effect when pop-up is opened or closed. -If the theme animations are ON, then pop-up effect is used with opening event -after increasing long touch effect. In this scenario, there is no pop-up effect -while closing. All pop-ups does not have theme animation.

-
- -

Pop-up close

-

It provides decreasing smooth feedback while closing pop-up and -when theme animations are ON.

-
- -

Increasing long touch

-

It provides increasing smooth feedback. This can be used with either -long tap animation or pop-up opening theme effects. If the theme effects are -ON and long tap opens a pop-up, then feedback is provided only with long tap. -This is followed by pop-up.

-
- -

Basic tab

-

It provides strong pulse effect with touch down event in tab area.

-
- -

Smooth flick

-

It provides smooth feedback with drag when horizontal movement is -possible.

-
- -

Sensitive flick

-

It provides sensitive pulse effect with touch release when horizontal -movement is possible.

-
- -

Sensitive edit

-

It provides sensitive pulse effect in editors with touch down and -release.

-
- -

Text edit

-

It provides pulse effect when painting the text. Effect is provided -with every character while painting the text.

-
- -

Blank edit

-

It provides pulse effect when painting blank character. By default, -it is none.

-
- -

Line edit

-

It provides pulse effect when painting a line.

-
- -

Empty line

-

It provides pulse effect when painting an empty line. By default, -it is none.

-
- -

Check box

-

It provides pulse effect when marking/unmarking a check box.

-
- -

Multi-touch recognition

-

It provides double pulse (sensitive + sensitive) effect when multi-touch -is recognized (generally, when second finger is touched down).

-
- -

Smooth pinch

-

It provides smooth continuous feedback while moving fingers in multi-touch -pinch situation.

-
- -

Smooth rotate

-

It provides smooth continuous feedback while moving fingers in -multi-touch rotate situation.

-
- - -

-
Characteristics -of haptics related APIs

You can use the following APIs to create -haptic effects:

    -
  • Tactile Feedback -Client API

      -
    • It is available from S60 5th Edition onwards

    • -
    • It can be used on all S60 5th Edition or later mobile devices. However, -the feedback is played only on touch enabled layouts.

    • -
    • It provides simple functions for triggering various predefined tactile -feedback (vibration or audio) effects.

    • -
    • It enables a consistent user experience in all applications of the -mobile device (an application gives a logical feedback type as an input and -the actual physical effect depends on the mobile device configuration and -end user settings).

    • -
    • When the area feedback is used, latency is low for the feedback triggering -(a tactile feedback can already be triggered at the window server level prior -to the corresponding pointer event being delivered to the visible application).

    • -
    • Direct feedback can be easily integrated into CCoeControl::HandlePointerEventL() .

    • -
    • An application can select the logical tactile feedback from certain -types. The produced effect may be different on various mobile devices.

    • -
  • -
  • Haptics -API

      -
    • It is available from S60 5.2 Edition onwards.

    • -
    • It can be used in touch and hybrid mobile devices.

    • -
    • It provides an interface for accessing Haptics player that can control -different actuator types.

    • -
    • It enables producing of complex vibrator effects, such as an explosion -or machine gun effect in a game, bass boost for a music player, advanced ringing -tone vibration, and so on.

    • -
    • It enables simultaneous playing of different kinds of basis effects -and modifying them when played.

    • -
    • It allows for designing complex effects (using a separate PC application) -that can be loaded on Haptics player for playing.

    • -
    • It may require a special license key for third-party applications -(to be set at runtime) to enable the Haptics player functionality.

    • -
  • -
  • Vibra API

      -
    • It available from S60 3.0 onwards

    • -
    • It can be used for running device vibrator with given intensity for -a given period of time

    • -
    • It can be used by a privileged client application to play pulse effects, -which have a very short duration (as the ones used for tactile feedback)

    • -
  • -
-
When to use -Tactile Feedback Client API, Haptics API, and Vibra API

You must -use

    -
  • Tactile Feedback Client API for providing tactile feedback in custom -controls (grids, lists, and so on) which will comply with the style of Core -UI components to ensure a uniform user experience among applications

  • -
  • Haptics API on touch and hybrid mobile devices for producing complex -vibration feedback which cannot be achieved with Tactile Framework (games, -simulations, demos, and so on.)

  • -
  • Vibra API for producing haptic effects such as ringing tone vibration -in those mobile devices where Haptics API is not available or functional

  • -

-
Using -tactile feedback in C++ applications

The API to use for tactile -feedback is the Tactile -feedback client API.

The Symbian platform includes a tactile -feedback interface to add, modify and remove feedback areas in the registry. -There is also an option to trigger direct feedback and bypass the registry. - MTouchFeedback::Instance() is used for acquiring a pointer -to a touch feedback instance. When touch feedback is activated, the mobile -device users get a slight vibration when the control with the feedback interface -is touched.

Tactile feedback can be set and disabled in a client -application or a mobile device in some scenarios, for example, during phone -calls.

Client applications cannot determine the actual physical -feedback that is generated. It depends on device configuration and current -settings. In current devices, the user changeable settings include vibration -and audio feedback intensity level.

In your application, you can use -the following feedback types, defined in TTouchLogicalFeedback:

- - - -

ETouchFeedbackNone

-

It is used for disabling feedback in some areas of the application -window while using the area registry.

-
- -

ETouchFeedbackBasic

-

It is used as a default feedback for stylus touch down events. For -example, when the mobile device user taps a button or tab.

-
- -

ETouchFeedbackSensitive

-

It provides sensitive feedback in situations when:

    -
  • the triggering action is not very important (for example, change of -focus in a list)

  • -
  • there can be a large number of feedback instances within a short time -(for example, text selection which gives feedback on every new selected character).

  • -
It is also used for scrolling and dragging.

-
- - -

To use vibration or audio feedback in your application:

    -
  1. Include touchfeedback.lib in -your .mmp file.

  2. -
  3. Include touchfeedback.h.

  4. -
  5. To enable -tactile feedback for your application, add the following code.

    MTouchFeedback* feedback = MTouchFeedback::Instance(); -feedback->SetFeedbackEnabledForThisApp(ETrue); // enabling feedback is optional

    Do -not delete the pointer in the controller destructor.

  6. -
  7. To use tactile -feedback when a mobile device user points at a control, add the following -code.

    void CMyContainerControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) - { - // Feedback is always played at pointer down event - if(aPointerEvent.iType == TPointerEvent::EButton1Down) - { - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if (feedback) - { - feedback->InstantFeedback(ETouchFeedbackBasic); - } - } - - // Your other pointer event handling code here -
  8. -
  9. To enable -automatic feedback triggering in a specific area of a UI component, add

    feedback->SetFeedbackArea( this, - 1, // area Id - TRect( 0,0,20,20 ), - ETouchFeedbackBasic, - ETouchEventStylusDown ); -
  10. -

To use tactile feedback in an application, additional platform -security capabilities are not required.

+ + + + + +Tactile +feedback +

There are two cases where vibration or audio of the device is used as an +output method:

+
    +
  • As a tacticon to inform users through physical feedback, that +an important event is occurring in the device. For example, when a new message +arrives or a warning note is displayed.

  • +
  • As tactile feedback to indicate to the user that an interaction +event has been made. For example, users receive tactile feedback when they +press a button on the touch screen.

  • +
+

As with sounds, tactile feedback must be used carefully so as not to desensitize +the user to the vibration; the attention grabbing quality remains and functions +so long as the feedback is not too frequent.

+

Tactile feedback is enabled for all the Symbian platform UI components. +Tactile feedback can be disabled for the common UI components in an application. +However, this is acceptable only if tactile feedback causes interference with +other device functions.

+

The user can choose the level of tactile feedback and turn tacticons ON +and OFF.

+

The following table lists the tactile feedback effects:

+

Tactile feedback +effects + + + +

Effects

+

Description

+
+ + + +

Sensitive button

+

Provides single pulse effect on repeated key presses with buttons. +It is also possible with other similar components.

+
+ +

Basic button

+

Provides stronger single pulse effect to buttons. It is also possible +with other similar components.

+
+ +

Sensitive list

+

Provides single pulse effect to lists and grids. Effect is used +with move (drag and flick) when new item appears on the screen.

+
+ +

Basic list

+

Provides stronger single pulse effect to lists and grids. Effect +is used with touch down and release when tap makes an action.

In hierarchical +list, collapsing/expanding item provides basic list effect with touch down +and release.

+
+ +

Bounce effect

+

Provides pulse effect when list returns to its normal state after +boundary effect.

+
+ +

Sensitive slider

+

Provides pulse effect with scrollbar and slider thumbs. Effect is +provided with touch down and release in thumb area.

+
+ +

Smooth slider

+

Provides continuous smooth feedback when dragging scrollbar or slider +thumb. This can also be increasing or decreasing depending of the slider type.

+
+ +

Hold slider

+

Provides sensitive pulse effect when touch down and hold on the +slider or scrollbar area. Slider thumb starts moving step by step towards +the touch point. Every step gives one sensitive pulse. If slider thumb moves +directly to the touch point, then basic slider effect is provided.

+
+ +

Pop-up

+

Provides sensitive pulse effect when pop-up is opened or closed. +If the theme animations are ON, then pop-up effect is used with opening event +after increasing long touch effect. In this scenario, there is no pop-up effect +. All pop-ups do not have theme animation.

+
+ +

Pop-up close

+

Provides decreasing smooth feedback a pop-up and when theme animations +are ON.

+
+ +

Increasing long touch

+

Provides increasing smooth feedback. This can be used with either +long tap animation or pop-up opening theme effects. If the theme effects are +ON and long tap opens a pop-up, then feedback is provided only with long tap. +This is followed by pop-up.

+
+ +

Basic tab

+

Provides strong pulse effect with touch down event in tab area.

+
+ +

Smooth flick

+

Provides smooth feedback with drag when horizontal movement is possible.

+
+ +

Sensitive flick

+

Provides sensitive pulse effect with touch release when horizontal +movement is possible.

+
+ +

Sensitive edit

+

Provides sensitive pulse effect in editors with touch down and release.

+
+ +

Text edit

+

Provides pulse effect when painting the text. Effect is provided +with every character while painting the text.

+
+ +

Blank edit

+

Provides pulse effect when painting blank character. By default, +it is none.

+
+ +

Line edit

+

Provides pulse effect when painting a line.

+
+ +

Empty line

+

Provides pulse effect when painting an empty line. By default, it +is none.

+
+ +

Check box

+

Provides pulse effect when marking/unmarking a check box.

+
+ +

Multi-touch recognition

+

Provides double pulse (sensitive + sensitive) effect when multi-touch +is recognized (generally, when second finger is touched down).

+
+ +

Smooth pinch

+

Provides smooth continuous feedback while moving fingers in multi-touch +pinch situation.

+
+ +

Smooth rotate

+

Provides smooth continuous feedback while moving fingers in multi-touch +rotate situation.

+
+ + +

+
Haptics concept

The different senses associated +to the skin are called cutaneous senses. These senses are temperature, pressure +(touch itself), pain, tickle, itch and vibration senses. We can characterize +touch as passive or active. Passive touch means the sense of touch itself, +whereas active touch means the touch action.

To communicate through +the sense of touch, we have to stimulate some of the cutaneous senses or the +movement sense. The stimulation of the cutaneous senses or one of them by +a product is called tactile stimulation. Respectively, the stimulation of +the movement sense by a product is called haptic stimulation or just haptics. +Haptics is also used as general term for all issues related to sense of touch, +both human and machine.

Haptic feedback, often referred to as "Haptics", +is the use of the sense of touch in a user interface design to provide information +to an end user. In mobile phones, this generally means the use of vibrations +from the device's vibration alarm to denote that a touch screen button has +been pressed. In this particular example, the phone would vibrate slightly +in response to the user's activation of an on-screen control, making up for +the lack of a normal tactile response that the user would experience when +pressing a physical button.

+
Characteristics +of haptics related APIs

You can use the following APIs to create +haptic effects:

    +
  • Tactile Feedback +Client API

      +
    • Available from S60 5th Edition onwards.

    • +
    • It can be used on all S60 5th Edition or later mobile devices. However, +the feedback is played only on touch enabled layouts.

    • +
    • Provides simple functions for triggering various predefined tactile +feedback (vibration or audio) effects.

    • +
    • Enables a consistent user experience in all applications of the mobile +device (an application gives a logical feedback type as an input and the actual +physical effect depends on the mobile device configuration and end user settings).

    • +
    • When the area feedback is used, latency is low for the feedback triggering +(a tactile feedback can already be triggered at the window server level prior +to the corresponding pointer event being delivered to the visible application).

    • +
    • Direct feedback can be easily integrated into CCoeControl::HandlePointerEventL().

    • +
    • An application can select the logical tactile feedback from certain +types. The produced effect may be different on various mobile devices.

    • +
  • +
  • Haptics +API

      +
    • Available from S60 5th Edition, FP2 onwards.

    • +
    • It can be used in touch and hybrid mobile devices.

    • +
    • Provides an interface for accessing Haptics player that can control +different actuator types.

    • +
    • Enables producing of complex vibrator effects, such as an explosion +or machine gun effect in a game, bass boost for a music player, advanced ringing +tone vibration, and so on.

    • +
    • Enables simultaneous playing of different kinds of basis effects and +modifying them when played.

    • +
    • Allows the design of complex effects (using a separate PC application) +that can be loaded on Haptics player for playing.

    • +
    • It may require a special license key for third-party applications +(to be set at runtime) to enable the Haptics player functionality.

    • +
  • +
  • Vibra API

      +
    • Available from S60 3.0 onwards.

    • +
    • It can be used for running device vibrator with given intensity for +a given period of time.

    • +
    • It can be used by a privileged client application to play pulse effects, +which have a very short duration (as the ones used for tactile feedback).

    • +
  • +
+
When to use +Tactile Feedback Client API, Haptics API, and Vibra API

    +
  • Tactile Feedback Client API for providing tactile feedback in custom +controls (grids, lists, and so on), which will comply with the style of Core +UI components to ensure a uniform user experience among applications.

  • +
  • Haptics API on touch and hybrid mobile devices for producing complex +vibration feedback, which cannot be achieved with Tactile Framework (games, +simulations, demos, and so on).

  • +
  • Vibra API for producing haptic effects such as ringing tone vibration +in those mobile devices where Haptics API is not available or functional.

  • +

+
Using +tactile feedback in applications

The API to use for tactile feedback +is the Tactile feedback +client API.

The Symbian platform includes a tactile feedback +interface to add, modify and remove feedback areas in the registry. There +is also an option to trigger direct feedback and bypass the registry. MTouchFeedback::Instance() is +used for acquiring a pointer to a touch feedback instance. When touch feedback +is activated, the mobile device users get a slight vibration when the control +with the feedback interface is touched.

Tactile feedback can +be set and disabled in a client application or a mobile device in some scenarios, +for example, during phone calls.

Client applications cannot determine +the actual physical feedback that is generated. It depends on device configuration +and current settings. In current devices, the user changeable settings include +vibration and audio feedback intensity level.

For more information, +see Feedback.

\ No newline at end of file