
Originally Posted by
rguia
I tried what was suggested by the "Utilizing External Application Views" for launching WAP but it doesn't seem to work. If it is not currently running, it will launch WAP but it will just freeze and you have to re-boot.
If WAP is running, I get a "System Error" but it still launches the new URL.
Any ideas or thoughts? Below is a snippet of code of how I am implementing it.
if(iSettings->iAppModuleList[iSelectedIndex]->iDisplayName == _L("WAP"))
{
HBufC* param = HBufC::NewLC( 20 );
param->Des().Copy(iSettings->iAppModuleList[iSelectedIndex]->iDocument);
TUid id(TUid::Uid(AppUid));
TApaTaskList taskList (CEikonEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(id);
if(task.Exists())
{
HBufC8* param8 = HBufC8::NewLC(param->Length());
param8->Des().Append(*param);
task.SendMessage(TUid::Uid(0), *param8);
CleanupStack::PopAndDestroy();
}
else
{
RApaLsSession appArcSession;
User::LeaveIfError(appArcSession.Connect());
TThreadId id;
appArcSession.StartDocument(*param, TUid::Uid(AppUid), id);
appArcSession.Close();
}
CleanupStack::PopAndDestroy();
}