/**
* Mo mot dia chi URL bang trinh duyet mac dinh cua may
* Open WAP URL by built-in browser
*/
void VUtil::BrowseWAPWEBPageL(const TDesC& aUrl)
{
RApaLsSession apaLsSession;
const TUid KOSSBrowserUidValue =
{
0x10008D39
}; // 0x1020724D for S60 3rd Ed
HBufC* param = HBufC::NewLC(64);
param->Des().Copy(aUrl);//_L("4 http://huypv.net/uploads/demo/Ball.jad")
TUid id(KOSSBrowserUidValue);
TApaTaskList taskList(CEikonEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(id);
if (task.Exists())
{
task.BringToForeground();
HBufC8* param8 = HBufC8::NewLC(param->Length());
param8->Des().Append(*param);
task.SendMessage(TUid::Uid(0), *param8); // UID not used
CleanupStack::PopAndDestroy(param8);
}
else
{
if (!apaLsSession.Handle())
{
User::LeaveIfError(apaLsSession.Connect());
}
TThreadId thread;
User::LeaveIfError(apaLsSession.StartDocument(*param,
KOSSBrowserUidValue, thread));
apaLsSession.Close();
}
CleanupStack::PopAndDestroy(param);
}
Title:
Symbian C++ - Open WAP URL
Description:
/** * Mo mot dia chi URL bang trinh duyet mac dinh cua may * Open WAP URL by built-in browser */ void VUtil::BrowseWAPWEBPageL(const ...
...
Rating:
4