3,120
社区成员
发帖
与我相关
我的任务
分享
RWindowGroup& wg = iEikonEnv->RootWin();
wg.EnableScreenChangeEvents(); // subscribe screen change events
const TUid KUidPhone = { 0x100058b3 }; // The UID of the Phone application
const TUid KTargetUid = KUidPhone; // Assume its Phone App Uid
RWsSession& ws = iEikonEnv->WsSession();
TInt wgid=ws.GetFocusWindowGroup();
CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid);
TUid uid = gn->AppUid();
if(uid==KTargetUid)
{
// target found, and do something here.
}
CleanupStack::PopAndDestroy(); // gn