Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Retrieve information about the BlackBerry Browser

by BlackBerry Development Advisor ‎02-17-2010 09:17 AM - edited ‎09-20-2010 05:16 PM (6,974 Views)

Summary

This article applies to the following:

  • BlackBerry® smartphones based on Java® technology

 



Background

The use of the BlackBerry® Browser can be identified both generically and uniquely. When making a request to a web server, the User-Agent header is used to determine if a BlackBerry Browser is accessing a web page. The following examples demonstrate how the User-Agent can appear:

For a BlackBerry® 7290 smartphone running BlackBerry® Device Software 4.0.2, the User-Agent appears as follows:

User-Agent: BlackBerry7290/4.0.2 Profile/MIDP-2.0 Configuration/CLDC-1.1

 For a BlackBerry® 7210 smartphone running BlackBerry Device Software 3.7, the User-Agent appears as follows:

 

User-Agent: BlackBerry 7210/3.7.0 

 

Refer to the How to detect the BlackBerry Browser article for more information on capturing the BlackBerry User-Agent header.

 

The User-Agent headers look identical for the BlackBerry Browser, Internet Browser, Hotspot Browser and Wireless Access Protocol (WAP) Browser that could be running on the same BlackBerry smartphone. These can be differentiated by using the via header. The following are examples of the via header for all four browser types:

Internet Browser

 

Via: BISB_3.3.0.45, 1.1 pmds51.bisb1.blackberry:3128 (squid/2.5.STABLE12)

BlackBerry Browser

 

Via: MDS_5.0.0.62

WAP Browser (on the Rogers® wireless network)

 

Via: 1.1 to5magproxy1.int.gprs.rogers.com

Hotspot Browser

No via header

The specifications used for the BlackBerry smartphone and BlackBerry Device Software can be found through the use of the profile header. The profile header provides a link to an Extensible Markup Language (XML) document that describes the specifications and supported features of the BlackBerry smartphone accessing the page. The following example shows how a profile header can appear:

 

profile: http://www.blackberry.net/go/mobile/profiles/uaprof/7290/4.0.0.rdf

Each BlackBerry Browser user can also be uniquely identified. A BlackBerry® Mobile Data Service administrator can configure a BlackBerry Mobile Data Service server to send a BlackBerry smartphone user’s email address and personal identification number (PIN) with each Hypertext Transfer Protocol (HTTP) request from a BlackBerry Browser. The BlackBerry Mobile Data Service can also be configured to send this information to a certain domain, such as a corporate intranet. If configured, the email address and PIN are sent as headers in the HTTP request and appear as follows:

 

Rim-device-email: simulator@pushme.com
Rim-device-id: 2100000a

Note: The Rim-device-email and Rim-device-id parameters can only be sent when using the BlackBerry Browser, and are not available when using the WAP or the BlackBerry® Internet Service Browser.

Procedure

The BlackBerry Mobile Data Service Simulator can be configured to send the email address and PINs of a BlackBerry Simulator with each HTTP request from the BlackBerry Browser. To do so, you must edit the rimpublic.property file located in the MDS\config directory and modify the line under the “#[HTTP HANDLER]” header. You must also specify the value you wish to send, as shown below:

 

application.handler.http.header=email,pin

Note: BlackBerry Device Software 4.0 and later support the email.pin parameter. In earlier versions, you must choose either email or pin.

The BlackBerry Mobile Data Service can be configured to only send the email address or PIN to specific domains, such as a corporate intranet. You can specify domains in the application.handler.http.header.domain parameter. This parameter accepts domains as a regular expression. The following example will send the email address or PIN to all rim.net subdomains:

 

application.handler.http.header.domain=.+\.rim\.net
Contributors
Users Online
Currently online: 22 members 2,581 guests
Please welcome our newest community members: