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

Java Development

Posts: 77
Registered: ‎11-20-2008
My Device: Not Specified

Retrieve the user agent from java application

Is there any way to retrieve the user agent a java app?  I found that in 4.7, I can retrieve it from the java system with:




However, this doesn't seem to work with 4.6.  Any way to get it with OS 4.6 and below?

BlackBerry Development Advisor
Posts: 15,760
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Retrieve the user agent from java application

The DeviceInfo class can provide the BlackBerry model and handheld software version, which are sent in the user agent header.  The following links show the format of the user agent header.





Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker