×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    22

    How to simulate touch event (to simulate beep and haptics)

    Hi!

    I created class, derived from CEikCommandButton, with overwrited function HandlePointerEventL.

    In HandlePointerEventL I implemented some functionality, but there is no any haptics, or beeps, when pointer event occurs.

    But on other standard controls - when you clicking on some UI element(tab, listbox, etc.) there are beep and haptics vibro ( if they are enabled in phone's options ).

    How could I to simulate it manually? May be I must to send some event to some control?


    And some simple offtopic:

    How could I to swap CEikCommandButton's colors? I want to show white text on black background, instead of black on the white, while button is pressed.

    Thanks a lot for your answers!
    Last edited by XclusR; 2009-02-03 at 12:50.

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: How to simulate touch event (to simulate beep and haptics)


  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    22

    Re: How to simulate touch event (to simulate beep and haptics)

    A.A.M., thank your fo your quick reply!

    This is wery interesting information.

    Unfortunately I am building under 3rd edition (due my app uses some plugins, which not avaliable in 5th edition),
    and there is no Tactile Feedback Client API :(
    Last edited by XclusR; 2009-02-03 at 15:20.

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: How to simulate touch event (to simulate beep and haptics)

    The button functionality is provided by CAknButton which is derived from CAknControl and not CEikCommandButton so that is probably the source of the problem.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    22

    Re: How to simulate touch event (to simulate beep and haptics)

    Paul.Todd, thank you for your answer!

    CAknButton - not documented in S60 3d, and there is no aknbutton.h in 3d edition SDK.

    I copied aknbutton.h from 5th edition SDK, and created test project, and it works! :)

    I will rewrite some my code later due it will be some major changes... (creating resources, etc...)

    I want to keep CEikCommandButton for now... why clicking on button doesn't generate Tactile Feedback?

    Both CEikCommandButton and CAknButton are derived from CAknControl, what is differ?

    Which event motivate phone to generate Tactile Feedback?

  6. #6
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: How to simulate touch event (to simulate beep and haptics)

    You cannot use API's from the 5th edition in the 3rd edition, the libraries are simply not there, the other way way round normally works (in my experience) but even then its still not guaranteed.

    What will likely happen is that once the application is actually using CAknButton API calls it will fail to link unless the libraries are copied from 5th edition and then fail to run on 3rd edition as the exported functions are not present in the 3rd edition SDK.

    Nokia have decided to use their own button implementation and not the Symbian supplied one. You should not be using the Symbian one as it may be incompatible with 5th edition since it would not have been updated.

    People have posted examples on using the tactile feedback API but that only works on 5th edtion.

    Basically:
    3rd & 5th ed compatability: YOU **MAY** HAVE SUCCESS IF YOU BUILD AND ONLY USE API'S PRESENT ON THE 3RD EDITION SDK. NO TOUCH SUPPORT AT ALL, NO API's INTRODUCED IN 5TH EDITION...

    DO NOT USE CAknToolbar, CAknButton, CAknChoiceList or any of the other controls introduced in 5th edition as they are not implemented and not present on earlier devices.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×