Receiving long-tap events

To receive long-tap events in your application using the Touch UI utilities API, follow the steps below:

  1. Link the AVKON libraries avkon.lib and eikcoctl.lib to the project file of the application.

  2. Provide an observer class that implements the MAknLongTapDetectorCallBack interface.

  3. Create an instance of the class CAknLongTapDetector and pass pointer events to the long-tap detector.

  4. Receive long-tap events through the observer interface.

  5. Delete the long-tap detector.

Use cases for the long-tap detector are shown in the figure below.

Figure 1. Touch UI utilities API use cases

To use the Touch UI utilities long-tap detector in your application, implement the following use cases.

The following use cases are optional, allowing you to set additional properties for your long-tap detector.