×
Namespaces

Variants
Actions

如何获取设备当前情景模式

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

兼容于
平台: S60 3rd Edition, FP1
Symbian
S60 3rd Edition FP1

文章
huwell 在 30 Jun 2007 创建
最后由 hamishwillee 在 28 Nov 2012 编辑
  • 详细描述:

我们可以通过使用Profiles Engine Wrapper API来获取当前情景模式。


首先需要包含这两个头文件:

mproengengine.h
proengfactory.h


然后是链接库:

ProfileEngine.lib


再看下列演示代码:

MProEngEngine* engine = ProEngFactory::NewEngineLC();
 
TInt activeId( engine->ActiveProfileId() );


通过调用ActiveProfileId()我们可以获取如下返回值:

0 - General
 
1 - Silent
 
2 - Meeting
 
3 - Outdoor
 
4 - Pager
 
5 – Offline
This page was last modified on 28 November 2012, at 08:46.
94 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.

×