本文整理汇总了Java中net.rim.device.api.system.Branding.getVendorId方法的典型用法代码示例。如果您正苦于以下问题:Java Branding.getVendorId方法的具体用法?Java Branding.getVendorId怎么用?Java Branding.getVendorId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.rim.device.api.system.Branding
的用法示例。
在下文中一共展示了Branding.getVendorId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProperty
import net.rim.device.api.system.Branding; //导入方法依赖的package包/类
public String getProperty(String key, String defaultValue) {
if ("User-Agent".equals(key)) {
return "Blackberry" + DeviceInfo.getDeviceName() + "/" + DeviceInfo.getSoftwareVersion()
+ " Profile/" + System.getProperty("microedition.profiles")
+ " Configuration/"
+ System.getProperty("microedition.configuration")
+ " VendorID/" + Branding.getVendorId();
}
return super.getProperty(key, defaultValue);
}
示例2: getUserAgent
import net.rim.device.api.system.Branding; //导入方法依赖的package包/类
private static String getUserAgent() {
String deviceName = DeviceInfo.getDeviceName();
String version = getPlatformVersion();
String profile = System.getProperty("microedition.profiles");
String configuration = System.getProperty("microedition.configuration");
String applicationVersion = getApplicationVersion();
int vendorId = Branding.getVendorId();
return "BlackBerry" + deviceName + "/" + version + " Profile/" + profile
+ " Configuration/" + configuration + " VendorID/" + vendorId
+ " Application/" + applicationVersion;
}