how to get blackberry user agent information like this:

Blackberry7290/4.1.0.139 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/-1

here is the answer[1]:

String userAgent = "Blackberry" + DeviceInfo.getDeviceName() + "/" + getOsVersion() + " Profile/" + System.getProperty( "microedition.profiles" ) + " Configuration/" + System.getProperty( "microedition.configuration" ) + " VendorID/" + Branding.getVendorId();
public static String getOsVersion()
{   String version = "";
    ApplicationDescriptor[] ad = ApplicationManager.getApplicationManager().getVisibleApplications();
    for( int i = 0; i < ad.length; i++)
    {   if( ad[i].getModuleName().trim().equalsIgnoreCase( "net_rim_bb_ribbon_app" ) )
        {   version = ad[i].getVersion();
            break;
        }
    }
    return version;
}

[1] http://www.blackberryforums.com/developer-forum/143972-profile-midp-2-0-configuration-cldc-1-1-how-get-info-programmatically.html