×
Namespaces

Variants
Actions

How to send message to a specified application

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: kavitaobhan (20 Nov 2007)
Last edited: hamishwillee (14 Jun 2013)

Header

#include <apacmdln.h>  
#include <apgcli.h>
#include <apgtask.h>
#include <e32std.h>
#include <w32std.h>


Sending Custom message to a specified application

/*
* @param aApplicationUid :- Uid of the application to which the message needs to be send
* @param aExternalMessage:- A Message to be sent to the application
*/

// Sends message to the specified application
TInt SendingMessageToAppL( const TUid& aApplicationUid, const TDesC8& aExternalMessage )
{
RWsSession windowSession;
User::LeaveIfError( windowSession.Connect() );
 
TApaTaskList apataskList( windowSession);
TApaTask apatask = taskList.FindApp( aApplicationUid );
 
const TUid KOpenCreateUid = { KUidApaMessageSwitchCreateFileValue };
TInt pseudoCode = apatask.SendMessage( KOpenCreateUid ,aExternalMessage );
windowSession.Close();
 
return pseudoCode;
}

Related Links

How to send particular Event to External application in Symbian

This page was last modified on 14 June 2013, at 09:29.
43 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.

×