Giving tactile feedback in touch UI apps using Symbian C++
S60 5th Edition
Tactile feedback provides the user a physical pulse (vibration) when touch screen interaction has been successful.
Tactile feedback provides an interface to add, modify, and remove feedback areas in the registry. There is also an option to trigger direct feedback by bypassing the registry.
MTouchFeedback is used for acquiring a pointer to the touch feedback instance.
This snippet can be self-signed.
The following capabilities and libraries are required:
Include two headers
class CImageConverterContainer : public CCoeControl
// Create an instance of touch feedback
void CImageConverterContainer::ConstructL(const TRect& /*aRect*/)
iTouchFeedBack = MTouchFeedback::Instance();
// Give some vibra to the user when a pointer down event occurs
void CImageConverterContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent)
if (aPointerEvent.iType == TPointerEvent::EButton1Down)
// Give feedback to user (vibration)
Parameters into MTouchFeedback::InstantFeedback().
* ETouchFeedbackNone - Use for disabling feedback for some areas of the
* window when using area registry.
* ETouchFeedbackBasic - Use as default feedback for pen down events.
* For example, pressing a button or tab.
* ETouchFeedbackSensitive - Sensitive feedback situations
* where the triggering action is not very
* important (e.g. change focus in list), or when
* there can be a large amount of feedback in
* a short time (e.g. text selection which gives
* feedback on every new selected character).
* Also used for scrolling and dragging.
The user gets vibration feedback when using the stylus / finger down (tapping on the screen).