New features in this release
New user agent string
The BlackBerry® Browser for the BlackBerry® Tablet OS has an updated user agent string to enable developers to differentiate between BlackBerry tablets and BlackBerry smartphones.
The user agent string for BlackBerry Browser on BlackBerry tablets is:
Mozilla/5.0 (<BlackBerry_tablet>; U: <OS_version>; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+
Developers can access Web Inspector functionality using a BlackBerry smartphone or BlackBerry tablet, or using a BlackBerry Smartphone Simulator or BlackBerry Tablet Simulator.
The BlackBerry Browser uses a client-server architecture to make Web Inspector functionality available to developers. The BlackBerry Browser acts as a web server. It serves the page over HTTP over a Wi-Fi® connection; developers inspect the content remotely on a desktop browser. Developers can use any WebKit-based desktop browser on the same Wi-Fi network to navigate to the IP address and port number used by the BlackBerry Browser and begin inspecting the code.
By default, Web Inspector is disabled in the browser. To use the Web Inspector, it must be in the BlackBerry Browser options. Once Web Inspector is enabled, the browser provides the IP address and port number it will use to serve the content.
Adobe Flash Player 10.1 and ActionScript 3.0
The BlackBerry® Browser on the BlackBerry® Tablet OS includes the Adobe® Flash® Player 10.1 application runtime and support forAdobe® ActionScript® 3.0, making Flash based web content accessible to BlackBerry tablet users.
Adobe Flash Player 10.1 was developed to provide the improvements in performance and the reduction in processor usage that were necessary to bring Flash content and applications to mobile devices such as smartphones and tablets. APIs have been added to ActionScript 3.0 to allow Flash applications to access some of the functionality that is unique to mobile devices, such as access to accelerometer and geolocation information and support for touch events and gesture events.
The BlackBerry Browser is capable of rendering most existing Flash content with little or no additional development effort. However, Flash to take advantage of some of the unique UI and hardware features of BlackBerry tablets, developers can create feature-rich Flash applications specifically for BlackBerry tablet users.
Access to native events
The BlackBerry® Browser now supports two new meta tags:
In the past, access to certain user events was not possible from within web content because of a number of usability-related features implemented by the browser. The introduction or the cursor-event-mode and touch-event-mode meta tags allows developers to disable these UI features for a web page, so that browser passes the entire array of events to the web page.
By default, the BlackBerry Browser captures and processes most trackpad clicks or touch events at the UI level to allow for improved usability on small screens. For example, on BlackBerry devices with a trackpad, when the user clicks the track pad on an area of the content that is not a link, the browser zooms into that content block. On devices with a touch screen, users can swipe to scroll, double tap to zoom in to a content block, or touch and hold to display the context menu. In addition, on touch screen devices, most touch events are converted by the browser directly into mouse events; this behavior allows the browser to replicate the way desktop browsers manage user interaction with forms and links, but prevents web content from accessing touch events and gestures as input.
By defining event-handling behavior with the cursor-event-mode and touch-event-mode meta tags, web developers have access to the same interaction model available to Java® developers in the BlackBerry® Java® SDK. For example, web developers can track both the direction and distance of a swipe event, and respond differently based on the swipe direction or distance. Access to these events gives web developers the opportunity to create more dynamic and robust games and applications for the BlackBerry Browser.
Web Sockets API
The BlackBerry® Browser now includes support for the Web Sockets API, which is designed to permit near real-time communication with web server. A web socket is a bi-directional communication channel between a web server and a browser that allows messages to be sent back and forth without requiring an HTTP request and response each time.
The Web Socket API is designed to hide much of the complexity of socket communication. A socket is opened when a WebSocket object is constructed. Once the socket connection is established, the browser and server can send data back and forth. Once the socket is closed, it cannot be reopened; a new WebSocket objected must be constructed.
Web sockets can be an efficient solution for a web applications that require regular communication with a server. Because a web socket is established once and used repeatedly without the need for communication over HTTP, it can greatly reduce the overhead of sending multiple HTTP headers back and forth. In addition, web sockets can eliminate the need for inefficient communication practices such as polling, in which the browser checks repeatedly for new data on the server. Because a web socket is an open communication channel, the browser only needs to listen for incoming messages. When the server has new data, it sends a new message to the browser. The browser receives the message as it arrives.
Web sockets are not subject to the same-origin policy. The browser can open a socket with a server that is different from the server that originally served the web page.
By default, support for web sockets is disabled in the BlackBerry Browser. To establish a web socket between the browser and a server, the user must first select the Enable Web Sockets setting in the BlackBerry Browser options. Because this technology is dependent upon a user setting, web developers should provide alternate content in the event that web sockets are not available.
The BlackBerry® Browser now includes full support for HTML 5 embedded media, excluding the <track> element.
- the <audio> and <video> elements, which let you embed audio or video into your content without the need for a plug-in
- the <source> element , which lets you specify a media resource; multiple <source> elements can be included to specify a prioritized list of media resources
- a scripting API that lets you control playback
- a set of media-related events