Feedback

Visual feedback is the most important sensory feedback when entering characters on screen. Visual feedback can be, for example, button effects, color changes, status indicators, touch/release state changes, or clearing the screen when transitioning to next screen.

With audio feedback, lower clicks and tones are preferred over loud beeps, though most people turn audio feedback off anyway.

Vibration is used as tactile feedback for touch screen interaction or input. Tactile feedback gives the user an immediate response that the touch event has been registered.

With the Symbian touch UI, tactile feedback is used in the following situations:

  • Sensors: a tap on the device by hand provides tactile feedback to the user in case of a successful interaction.

  • Touch interaction (touch screen): to indicate to the user that an interaction event has been successful. For example, when the user presses a button on the touch screen

Note: Tactile feedback is included in those common UI components where it has been seen as beneficial. When creating new applications and designing custom components, tactile feedback is to be included where found useful. For example, in any button type of UI component, the tactile feedback is naturally beneficial.

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

ETouchFeedbackNone

Used for disabling feedback in some areas of the application window while using the area registry.

ETouchFeedbackBasic

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

ETouchFeedbackSensitive

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. Include touchfeedback.h .

  3. 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.

  4. 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
           
  5. 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 );
           
Note:
  • To use tactile feedback in an application, additional platform security capabilities are not required.

  • Applications themselves do not need to generate feedback effects, unless they are using custom components. The feedback is generated by components that the applications use.

For more information, see Tactile feedback .