X-Callback-URL
iCab Mobile supports the x-callback-url protocol. This protocol is a simple way Apps can communicate by sending URLs to each other. These URLs have a well-defined format with a command and parameters. The protocol is very flexible, but nevertheless very simple and easy to use.
In iCab Mobile the x-callback-url protocol can be used for the following tasks.
Adding Bookmarks
An Apps can add a bookmark in the iCab Mobile bookmarks list. iCab will create a special folder for all the bookmarks which are received from other Apps this way, so the user will always see that these bookmarks came from other Apps
Adding Filters
An App can add a new filter to the filter manager. iCab will again create a special Filters group for filters that came from another App, so you can find them easily.
Adding Search Engines
An App can add a new search engine to the list of search engines, in case it does not yet exist.
Adding a page to the Reading List
An App can add a page to the reading list of iCab Mobile.
Start a Download
An App can initiate a download within iCab Mobile. So if an App does not provide a download manager itself, it can use iCab for this.
Start a Search
An App can launch iCab Mobile and immediately open the search window, so the user can directly enter a search term.
Open a Web Page
An App can open a web page in iCab Mobile. This is nothing special, because this was already possible before. What’s new is that the page can control if the new page is opened in a new foreground tab, a background tab or the current tab. It can also control wether the page opens in fullscreen or normal mode.
Start iCab Mobile
Starting iCab Mobile in normal mode or in fullscreen mode.
Though it is clear that most Apps won’t support any of these tasks, some Apps can probably do some great stuff with this new feature. I’m thinking about Apps like Launch Center Pro which already supports many of these actions.
If you want to support one or more of the above tasks of iCab Mobile in your own App, you only need to send iCab Mobile a properly formatted URL which conforms to the x-callback-url protocol specification. Such an URL looks like this:
[scheme]://x-callback-url/[action]?[x-callback-parameters]&[action parameters]
For iCab Mobile, the [scheme] should be “x-icabmobile”, though also the scheme “icabmobile” will work. The [x-callback-parameters] needs to be set up according to the requirements of your App. These parameters control if iCab Mobile will return to your App after it has processed the command or if iCab stays the active application. [action] describes the command that is executed in iCab Mobile and [action parameters] define the parameters for this command. All values for the parameters should be URL encoded strings. All parameters are key value pairs and concatenated by “&” in the URL in the usual way. At the end of this article you’ll find some concrete examples for these URLs:
x-icabmobile://x-callback-url/addBookmark?x-success=yourapp://success-handler&x-error=yourapp://error-hander&url=http://www.icab-mobile.de/&title=iCab%20Mobile%20Homepage
For more information, please see the official x-callback-url protocol specification
The [action] and [action parameters] you can use in iCab Mobile are the following:
Action Required parameters Optional parameters Description
addBookmark url=[url] title=[title] Adds a bookmark with the given URL and title to the Bookmarks of iCab Mobile
addFilter url=[filter-url]
Should use wildcards “*”, “?” and “[abc]” to make the url filter valid for more than a single page type=off
type=block
type=load Creates a new filter. Without the type parameter, iCab defaults to “block”
addSearchEngine url=[url]
Should include the string “%@” where the search term needs to be added title=[title] Adds a new search engine to the list of search engines
addReadingList url=[url] title=[title] Adds the page with the given URL and title to the Reading list
search searchTerm=[searchTerm]
searchEngine=[searchEngine] Launches iCab and opens the search window, so the user can directly start entering a search term, if the search term is given, the search is started immediately. The searchEngine parameter lets you select the search engine whih should be used for the search. The first search engine whose name contains the text from the "searchEngine" parameter and which is included in the search engines list of iCab Mobile will be used for the search. If no matching search engine is found, the default one is used.
fullscreen Launches iCab in fullscreen mode
normalmode Launches iCab in normal mode
open url=[url] destination=currentTab
destination=backgroundTab
destination=newTab
fullscreen=yes
fullscreen=no
Opens the page in the given destination and enters the fullscreen mode when requested. The URL “quickstarter:” can be used to open the Quickstarter page
download url=[url] filename=[filename]
referrer=[url]
Starts the download of the file at URL and uses the filename to save it in the
X 回调 URLiCab 移动支持 x 回调 url 协议。这个协议是一种简单的方法,应用程序可以通过将 Url 发送给彼此进行通信。这些 Url 有明确定义的格式与命令和参数。议定书 》 是非常灵活的但尽管如此非常简单和容易使用。在 iCab 移动 x 回调 url 协议可以用于下列任务。添加书签应用程序可以在 iCab 移动书签列表中添加一个书签。iCab 将创建一个专用文件夹被接受从其他应用程序这种方式,因此用户将总是看到这些书签来自其他应用程序的所有书签添加筛选器应用程序可以将新的筛选器添加到筛选器管理器。iCab 将再次为创建一个特殊过滤器组来自另一个应用程序,所以你可以很容易找到他们的筛选器。添加搜索引擎尚不存在的情况下,应用程序可以向搜索引擎的列表添加一个新的搜索引擎。将网页添加到阅读列表应用程序可以将网页添加到 iCab 移动的阅读清单。开始下载应用程序可以启动 iCab 手机内的下载。所以如果一个应用程序不能提供一个下载管理器本身,它可以用于此 iCab。开始搜索应用程序可以启动 iCab 移动,并立即打开搜索窗口中,以便用户可以直接输入一个搜索词。打开网页An App can open a web page in iCab Mobile. This is nothing special, because this was already possible before. What’s new is that the page can control if the new page is opened in a new foreground tab, a background tab or the current tab. It can also control wether the page opens in fullscreen or normal mode.Start iCab MobileStarting iCab Mobile in normal mode or in fullscreen mode.Though it is clear that most Apps won’t support any of these tasks, some Apps can probably do some great stuff with this new feature. I’m thinking about Apps like Launch Center Pro which already supports many of these actions.If you want to support one or more of the above tasks of iCab Mobile in your own App, you only need to send iCab Mobile a properly formatted URL which conforms to the x-callback-url protocol specification. Such an URL looks like this:[scheme]://x-callback-url/[action]?[x-callback-parameters]&[action parameters]为 iCab 移动,[计划] 应该是"x-icabmobile",虽然"icabmobile"计划也将工作。[X 回调参数] 需要根据您的应用程序的要求设置。这些参数控制如果 iCab 移动将返回到您的应用程序,它已经处理了命令后或 iCab 保持活动的应用程序。[动作] 描述在 iCab 移动中执行的命令和 [操作参数] 定义此命令的参数。所有值的参数应该都是 URL 编码的字符串。所有参数是键/值对,并且在通常的方式连接在 URL 中的"&"。在这篇文章的末尾,你会发现一些具体的例子为这些 Url:x-icabmobile://x-callback-url/addBookmark?x-success=yourapp://success-handler & x 错误 = yourapp://error-hander & url = http://www.icab-mobile.de/ & 标题 = iCab %20Mobile %20homepage有关详细信息,请参阅官方 x 回调 url 协议规范[动作] 和 [操作参数],您可以使用在 iCab 移动如下:所需的操作参数可选参数描述addBookmark url = [url] 标题 = [标题] 添加给定的 URL 与标题到 iCab 移动的书签书签addFilter url = [筛选器 url]应使用通配符"*"、"?"和"[abc]",以弥补单个页面类型比 url 筛选器有效 = 关类型 = 块类型 = 负载创建一个新的筛选器。没有为类型参数,iCab 默认为"块"addSearchEngine url=[url]Should include the string “%@” where the search term needs to be added title=[title] Adds a new search engine to the list of search enginesaddReadingList url=[url] title=[title] Adds the page with the given URL and title to the Reading listsearch searchTerm=[searchTerm]searchEngine=[searchEngine] Launches iCab and opens the search window, so the user can directly start entering a search term, if the search term is given, the search is started immediately. The searchEngine parameter lets you select the search engine whih should be used for the search. The first search engine whose name contains the text from the "searchEngine" parameter and which is included in the search engines list of iCab Mobile will be used for the search. If no matching search engine is found, the default one is used.fullscreen Launches iCab in fullscreen modenormalmode Launches iCab in normal modeopen url=[url] destination=currentTabdestination=backgroundTabdestination=newTabfullscreen=yesfullscreen=noOpens the page in the given destination and enters the fullscreen mode when requested. The URL “quickstarter:” can be used to open the Quickstarter pagedownload url=[url] filename=[filename]referrer=[url]Starts the download of the file at URL and uses the filename to save it in the
正在翻譯中..