You Are Here:

Community: Wiki

This page was last modified on 4 August 2009, at 07:59.

, 获取情景模式与铃音文件

From Forum Nokia Wiki

一直以来为了读取/设置到用户的情景模式, 短信提示音, 都是很郁闷的使用nokia提供的mr的plugin api和fp1自己的api, 因为不同库, 所以必须发布2个版本, 提交express时浪费了无数的money和精力(维护, 验证, 测试).

后来, 读到子腾大侠的无敌吸星大法, 才知道还有种方法敲开symbian的重重内幕, 今天终于下定决心, 参考子腾大侠的

http://discussion.forum.nokia.com/fo...967#post524967

无敌吸星大法, 解决了这个问题, 比较发现 0x101F8798是CRepository的key, 而0x7e000001是情景模式的index, 短信提示音是mode的一个位移算法, 类似的手机铃音只是下一个值而已, 贴出我的测试代码的核心, 大家一看即知

const char* profile[] = { "biaozhun", "wusheng", "huiyi", "huwai", "xunhuji", "lixian", }; CRepository* cenrep = CRepository::NewLC(TUid::Uid(0x101F8798));

TInt mode = -1; User::LeaveIfError(cenrep->Get(0x7e000001, mode));

TInt k = mode << 24 | 0x04; TFileName toneFile; User::LeaveIfError(cenrep->Get(k, toneFile));

CleanupStack::PopAndDestroy(cenrep);

TBuf8<100> pm( (const TUint8*)profile[mode] ); TBuf<512> buf; buf.Copy(pm); buf.Append(_L("\r\n")); buf.Append(toneFile);

CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote; informationNote->ExecuteLD( buf );

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qfnZuserE5FtagQSxprofilerX