Namespaces
Variants
Actions

How to send message to a specified application

Jump to: navigation, search
Article Metadata

Article
Created: kavitaobhan (20 Nov 2007)
Last edited: hamishwillee (06 Feb 2012)

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 6 February 2012, at 06:25.
200 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved