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-Callback-URLiCab 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 BookmarksAn 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 AppsAdding FiltersAn 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 EnginesAn 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 ListAn App can add a page to the reading list of iCab Mobile.Start a DownloadAn 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 SearchAn App can launch iCab Mobile and immediately open the search window, so the user can directly enter a search term.Open a Web PageAn 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]应包含字符串"%@"在哪里搜索词需要添加标题 = [标题] 添加新的搜索引擎对搜索引擎的列表addReadingList url = [url] 标题 = [标题] 添加给定的 URL 与标题到阅读列表页搜索 searchTerm = [searchTerm]搜索引擎 = [搜索引擎] 发射 iCab 和打开搜索窗口,这样用户就可以直接开始输入搜索词,如果给定的搜索词,搜索立即开始。搜索引擎参数使您得以的选择搜索引擎升华应该用于搜索。第一搜索引擎名称中包含"搜索引擎"参数中的文本和其中的 iCab 移动搜索引擎列表中将用于搜索。如果没有匹配的搜索引擎找到,则使用默认一个。在全屏模式下的全屏发射 iCab在正常模式下 normalmode 发射 iCab打开 url = [url] 目的地 = currentTab目的地 = backgroundTab目的地 = 不再全屏 = 是全屏 = 否在给定目标中打开页面,进入全屏模式时要求。URL"任务栏:"可以用来打开快速启动页下载 url = [url] 文件名 = [文件名]推荐人 = [url]开始在 URL 文件的下载和使用文件名来保存它的
正在翻譯中..