BlackBerry® Mobile Data System (BlackBerry MDS) Connection Service
BlackBerry® Internet Service Browsing (BIS-B)
BlackBerry smartphone applications can make Hypertext Transfer Protocol (HTTP) connections to web sites using a variety of data transports. After opening an HTTP connection, and before reading or writing to the connection, request properties can be set. The User-Agent property can be set as follows:
HttpConnection conn = (HttpConnection) Connector.open(url); conn.setRequestProperty("User-Agent", "<Custom User Agent String>");
Some of the HTTP content is altered or removed when downloading using the BlackBerry MDS or BIS-B transport, where the User-Agent property has been set to include the word "BlackBerry" even if it is included with other text. Such modifications include removing parts of the header and changing special characters, such as '<', to characters that cannot be displayed. This behavior does not occur when connecting with direct Transmission Control Protocol (TCP).
Including the word "BlackBerry" in the User-Agent property, without other BlackBerry smartphone profile information, informs BlackBerry MDS or BIS-B that this is a BlackBerry smartphone based on C++ technology that requires transcoding of the HTTP content. The application receives the transcoded content from BlackBerry MDS or BIS-B and ignores the actual capabilities of the
Include the BlackBerry smartphone model number and BlackBerry® Device Software version in the User-Agent property. The BlackBerry smartphone profile information should also be sent to BlackBerry MDS or BIS-B. The format for the User-Agent property and profile headers can be found in this article.
Alternatively, a property can be specified to disable transcoding. This property is set as follows:
For consistency with the BlackBerry smartphone browser and compatibility with all BlackBerry smartphones, make sure that you are using the appropriate User-Agent and profile headers for HTML traffic downloaded over HTTP connections.