1 监听软件安装事件
2 如何在模拟器上实现安装过程
3 如何在程序中实现安装sis文件
void CXXXXXXXXXXXXX::StartInstallAppL(TInt aIndex)
{
RApaLsSession lsSession;
// Connect to application architecture server
User::LeaveIfError( lsSession.Connect() );
CleanupClosePushL( lsSession );
TApaAppInfo appInfo;
// Get info on all apps, then iterate through each app
// and write its info (caption, name, uid) to file
if(lsSession.GetAppInfo(appInfo, iAppInfoArray[aIndex].iUid) == KErrNone)
{
CApaCommandLine *cmd = CApaCommandLine::NewLC();
cmd->SetExecutableNameL( appInfo.iFullName);
cmd->SetCommandL( EApaCommandRun );
{
RApaLsSession lsSession;
// Connect to application architecture server
User::LeaveIfError( lsSession.Connect() );
CleanupClosePushL( lsSession );
TApaAppInfo appInfo;
// Get info on all apps, then iterate through each app
// and write its info (caption, name, uid) to file
if(lsSession.GetAppInfo(appInfo, iAppInfoArray[aIndex].iUid) == KErrNone)
{
CApaCommandLine *cmd = CApaCommandLine::NewLC();
cmd->SetExecutableNameL( appInfo.iFullName);
cmd->SetCommandL( EApaCommandRun );
lsSession.StartApp( *cmd );
CleanupStack::PopAndDestroy( cmd );
}
else
{
CleanupStack::PopAndDestroy( cmd );
}
else
{
}
CleanupStack::PopAndDestroy(); // file, lsSession, fs
}
}