×
Namespaces

Variants
Actions

如何在第三版FP1中设置/获取手机铃声

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

文章
huwell 在 07 Jul 2007 创建
最后由 hamishwillee 在 15 Dec 2011 编辑
  • 设备, 软件 版本:

S60 3rd Edition, FP1


概述

在S60第三版FP1中可以通过Profile Engine Wrapper API设置/获取手机铃声


获取铃声的解决方案

首先需要ProfileEngine.lib库。

需要的头文件是: mproengengine.h, proengfactory.h, mproengprofile.h, mproengtones.h

MProEngEngine* engine = ProEngFactory::NewEngineL();
 
CleanupReleasePushL(*engine);
 
MProEngProfile* activeProfile = engine->ActiveProfileL();
 
CleanupReleasePushL(*activeProfile);
 
MProEngTones& tones = activeProfile->ProfileTones();
 
// the ringing tone file name can be retrieved from calling tones.RingingTone1();
 
CleanupStack::PopAndDestroy(2);


修改铃声的解决方案

首先需要ProfileEngine.lib库。

需要的头文件是: mproengengine.h, proengfactory.h, mproengprofile.h, mproengtones.h

MProEngEngine* engine = ProEngFactory::NewEngineL();
 
CleanupReleasePushL(*engine);
 
MProEngProfile* activeProfile = engine->ActiveProfileL();
 
CleanupReleasePushL(*activeProfile);
 
MProEngTones& tones = activeProfile->ProfileTones();
 
_LIT( KToneName, "C:\\Data\\Sounds\\Digital\\Superman.mp3" );
 
TInt error = tones.SetRingingTone1L(KToneName);
 
activeProfile->CommitChangeL();
 
CleanupStack::PopAndDestroy(2);
This page was last modified on 15 December 2011, at 13:03.
17 page views in the last 30 days.