How to send particular Event to External application in Symbian
Article Metadata
Headers
#include <apacmdln.h>
#include <apgcli.h>
#include <apgtask.h>
#include <w32std.h>
Sending the Event to the Specified application
/*
* @param aApplicationUid :- Uid of the Application to which the event needs to be send
* @param aEventId :- Event to be passed
*/
void SendingEventTo( const TUid& aApplicationUid, const TUint& aEventUid )
{
RWsSession windowSession;
TInt err = windowSession.Connect();
if( err )
return;
TApaTaskList apataskList( windowSession );
TApaTask apatask = apataskList.FindApp( aApplicationUid );
if( apatask.Exists() )
{
TInt wgId = apataskList.WgId();
TWsEvent windowEvent;
windowEvent.SetType( aEventUid );
windowSession.SendEventToWindowGroup( wgId, windowEvent );
}
}


20 Sep
2009
Many times our application needs to interact with some another application/process to use its events or get some information from it or use its data. This article provides the code snippest to send a particular event to external application in Symbian. The code snippest is easy to understand and can be very useful in many situations while interacting with another process.
The article is specially meant for beginners to understand this soul concept.