Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.


From Wiki
Jump to: navigation, search
Article Metadata


huwell 在 28 Jun 2007 创建
最后由 hamishwillee 在 08 May 2013 编辑
  • 设备, 软件 版本:

S60 2nd Edition, Nokia 6600, versions 3.42.1 and 4.09.1, and Nokia 7610, version 4.0421.4

  • 说明:

S60 2nd Edition,S60 2nd Edition FP1,即Symbian OS v7.x不提供震动接口;
S60 2nd Edition FP2,S60 2nd Edition FP3,即Symbian OS v8.x开始使用CVibraControl类提供震动接口;
S60 3rd Edition, 即Symbian OS v9.x开始使用新的CHWRMVibra类提供震动接口。

  • 详细描述:

CVibraControl API已经在S60 SDK 2.0中有所描述,开发者也可以使用其工作。不过在Nokia6600中并没有被支持。
S60第三版中提供了一个新的Vibra Client API(CHWRMVibra)

  • 示例
// for S60 3rd
#include <hwrmvibra.h> // CHWRMVibra, HWRMVibraClient.lib
void DoVibrateL( TInt aDuration )
CHWRMVibra* vibra = CHWRMVibra::NewLC();
if ( CHWRMVibra::EVibraModeON == vibra->VibraSettings() ) // get vibration setting in the user profile
vibra->StartVibraL( aDuration );
CleanupStack::PopAndDestroy( vibra );
// for S60 2nd FP2 and FP3
#include <vibractrl.h> // CVibraControl, VibraCtrl.lib
void DoVibrateL( TUint16 aDuration )
CVibraControl* control = VibraFactory::NewL();
if ( CVibraControl::EVibraModeON == control->VibraSettings() ) // get vibration setting in the user profile
control->StartVibra( aDuration );
delete control;
control = NULL;
This page was last modified on 8 May 2013, at 00:02.
92 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.