SendMessage and ProcessMessageL

Login to reply to this topic.
Mon, 2005-05-09 09:44
Joined: 2005-02-11
Forum posts: 214
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?

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


Mon, 2005-05-09 10:47
Joined: 2005-01-08
Forum posts: 9
SendMessage and ProcessMessageL
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"));
}
Mon, 2005-05-09 11:08
Joined: 2005-02-11
Forum posts: 214
SendMessage and ProcessMessageL
Thanks, that did it.

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

Fri, 2006-06-09 10:15
Joined: 2005-02-11
Forum posts: 214
Re: SendMessage and ProcessMessageL
Now, after converting into Symbian 9, the message catching doesn't work again

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

Fri, 2006-06-09 10:56
Joined: 2004-09-20
Forum posts: 23
Re: SendMessage and ProcessMessageL
check your capability...
Fri, 2006-06-09 11:02
Joined: 2005-02-11
Forum posts: 214
Re: SendMessage and ProcessMessageL
Which one? These methods don't seem to require anything specific.

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

Fri, 2006-06-09 11:41
Joined: 2004-09-20
Forum posts: 23
Re: SendMessage and ProcessMessageL
try SwEvent
Fri, 2006-06-09 13:41
Joined: 2005-02-11
Forum posts: 214
Re: SendMessage and ProcessMessageL
Didn't work. This event is ment for sending Events, but I use SendMessage.
Probably have to figure out something else  Angry

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

Wed, 2006-06-14 10:00
Joined: 2005-02-11
Forum posts: 214
Re: SendMessage and ProcessMessageL
Stupid me  Cry
Actualy it works OK. I had changed UID in 3rd edition and didn't find the app

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

  • Login to reply to this topic.