Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

How to send particular Event to External application in Symbian

From Wiki
Jump to: navigation, search
Article Metadata
Created: kavitaobhan (19 Nov 2007)
Last edited: hamishwillee (06 Feb 2012)


#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 )
TApaTaskList apataskList( windowSession );
TApaTask apatask = apataskList.FindApp( aApplicationUid );
if( apatask.Exists() )
TInt wgId = apataskList.WgId();
TWsEvent windowEvent;
windowEvent.SetType( aEventUid );
windowSession.SendEventToWindowGroup( wgId, windowEvent );

Related Links

How to send message to a specified application  

This page was last modified on 6 February 2012, at 03:32.
16 page views in the last 30 days.