Launching the web browser on 3rd Edition to open a specified URL
来源:互联网 发布:搜狐网络大厦有食堂吗 编辑:程序博客网 时间:2024/04/24 05:15
http://wiki.forum.nokia.com/index.php/TSS000340_-_Launching_the_Web_browser_on_S60_3rd_Edition_to_open_a_specified_URL
Overview
Launching the Web browser on S60 3rd Edition to open a specified URL
Description
In order to launch the Web browser on S60 3rd Edition and have it automatically open a specified URL, the application must have the SWEvent capability. Note that the UID of the OSS browser in S60 3rd Edition is 0x1020724D and from S60 3rd Edition, FP1 onwards 0x10008D39.
Reference code:
RApaLsSession apaLsSession;
const TUid KOSSBrowserUidValue = {0x10008D39}; // 0x1020724D for S60 3rd Ed
HBufC* param = HBufC::NewLC(64);
param->Des().Copy(_L("4 http://www.yahoo.com/"));
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);
Note: If the browser is currently in the process of loading an URL and an external application tries to open another one, the error "Unable to retrieve" is shown and the new URL is not loaded.
See also topic TSS000551 - Different browser UIDs in S60 3rd Edition and S60 3rd Edition, FP1.
Here is some additional information about the parameters that are passed as command line arguments when launching the OSS Browser:
1. Start/Continue the browser and nothing is specified (the default case)
=> Parameter = <Any text>
2. Start/Continue the browser specifying a Bookmark
=> Parameter = “1”+”<Space>“+”<Uid of the Bookmark>”
3. Start/Continue the browser specifying a Saved deck
=> Parameter = “2”+” <Space>“+”<Uid of the Saved deck>”
4. Start/Continue the browser specifying a URL
=> Parameter = “4”+” <Space>“+”<Url>”
5. Start/Continue the browser specifying a URL and an Access Point
=> Parameter = “4”+”<Space>“+”<Url>”+”<Space>“+”<Uid of Ap>”
6. Start/Continue the browser with the start page. (Used when starting the browser with a long press of “0” in the Idle state of the phone.
=> Parameter = “5”
7. Start/Continue the browser specifying a Bookmark folder
=> Parameter = “6”+” <Space>“+”<Uid of the Folder>”
Browser Launcher API
The SDK API Plugin package for S60 3rd Edition SDKs includes the Browser Launcher API.
CBrowserLauncher
class will automatically determine which browser to launch.
Parameters passed to this API are in the same format as above:
<nowiki>
CBrowserLauncher* launcher = CBrowserLauncher::NewLC();
launcher->LaunchBrowserEmbeddedL(_L("4 http://www.nokia.com"));
CleanupStack::PopAndDestroy(launcher);
</nowiki>
- Launching the web browser on 3rd Edition to open a specified URL
- The Java(TM) Tutorial: A Short Course on the Basics (3rd Edition)
- How To Open An URL In Android’s Web Browser
- Introduction to Algorithm 3rd Edition
- C++ Programming Language, The (3rd Edition)
- Understanding the Linux Kernel, 3rd Edition
- Building the Data Warehouse (3rd Edition)
- The C# Programming Language (3rd Edition)
- Understanding the linux kernel 3rd edition
- CxBrowser, the open source / experimental web browser.
- How to Run Successful Projects III: The Silver Bullet (3rd Edition)
- DNS on Windows Server 2003 (3rd edition)
- The contents of 《Hadoop: The Definitive Guide》(3rd Edition)
- Shrink VmWare File VMDK——Failed to open the disk. The file specified is not a virtual disk
- A Practical Guide to Red Hat(R) Linux(R): Fedora(TM) Core and Red Hat Enterprise Linux (3rd Edition)
- Unable to open a test connection to the given database. JDBC url =
- Linux Device Drivers 3rd Edition An Introduction to
- Linux Device Drivers 3rd Edition About the Authors
- 导入cvs项目中文注释为乱码
- 【小阅读^大脑袋】0208 NO.316
- Visual Studio 2010 安装 MSDN Library
- CMApx 5 内置的紧缩表函数
- Flex入门
- Launching the web browser on 3rd Edition to open a specified URL
- Add a Bookmark
- OPC 与 RTDB
- 什么是网站,什么是网页,网页网站的关系
- 由于没有关闭connection,造成的后果
- [项目管理]工程与产品开发的差异——一个老项目的经典问题
- 灵图天行者9PC版、PPC版搜索不到卫星信号解决办法
- Empress .... 概念
- ado.net防sql注入实例