×
Namespaces

Variants
Actions

如何获得快速拨号的号码

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

平台安全性
需要的签名: DevCert
能力: ReadDeviceData ReadUserData WriteDeviceData WriteUserData

文章
翻译:
hoolee
最后由 hamishwillee 在 30 May 2013 编辑


下列示例演示了如何获取定义快速拨号位置的手机号码,这样我们在建立自己的拨号对话框时也可以支持快速拨号功能。

需要的头文件:

#include <CPbkContactEngine.h>
#include <spdiacontrol.h>

CSpdiaControl对应spdctrl.lib链接库 , 而CPbkContactEngine对应pbkeng.lib链接库,所以增加下列内容到你的mmp文件

LIBRARY   spdctrl.lib pbkeng.lib

增加下列代码到源代码中

const TInt KLen = 30;
CPbkContactEngine* pbkContactEngine = CPbkContactEngine::NewL();
CleanupStack::PushL(pbkContactEngine);
CSpdiaControl* speedDialControl = CSpdiaControl::NewL(*pbkContactEngine);
CleanupStack::PushL(speedDialControl);
TBuf<KLen> numberToDial;
numberToDial = speedDialControl->PhoneDialNumber(aSpeedDialPos); //aSpeedDialPos is the speed dial position for which we want to query the number
CleanupStack::PopAndDestroy(2);//speedDialControl, pbkContactEngine

numberToDial为需要快速拨号位置的手机号码

有时候我们需要询问手机设置的语音邮箱的号码,我们可以用下面的方法来处理,剩余的步骤和上述代码一样。

TBuf<KLen> numberToDial;
speedDialControl->VoiceMailL(numberToDial);
CAPABILITY ReadDeviceData ReadUserData WriteDeviceData WriteUserData

Link

How to assign speed dial

This page was last modified on 30 May 2013, at 04:37.
126 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.

×