SendMessage and ProcessMessageL

try SwEventWhich one? These methods don't seem to require anything specific.

"I only know that I know nothing." (Socrates)check your capability...
Now, after converting into Symbian 9, the message catching doesn't work again

"I only know that I know nothing." (Socrates)Thanks, that did it.

"I only know that I know nothing." (Socrates)hi,

try this:

RWsSession rws;
rws.Connect();
TApaTaskList taskList(rws);
TApaTask task = taskList.FindApp(KAppUid);
if (task.Exists())
{
  task.BringToForeground();
  TInt ret=task.SendMessage(TUid::Uid( KUidApaMessageSwitchOpenFileValue ), _L8("1"));
}
I try to send message to my APP from EXE.

Code:
RWsSession rws; 
rws.Connect(); 
TApaTaskList taskList(rws); 
TApaTask task = taskList.FindApp(KAppUid); 
if (task.Exists()) 
{
  task.BringToForeground();
  TInt ret=task.SendMessage(TUid::Uid( 0 ), _L8("1"));
}

In my app I try to catch it

Code:
in header:
virtual void ProcessMessageL(TUid aUid,const TDesC8& aParams);

in source:
void CMDMNotifierAppUi::ProcessMessageL(TUid aUid,const TDesC8& aParams)
{
 ShowNoteL(_L("MEssage arrives"));
}

The message is sent without errors, but nothing is catched. The app is brought into foreground correctly.
What can cause this lack of action?

转载于:https://www.cnblogs.com/yaoliang11/archive/2010/12/21/1912319.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值