本文整理汇总了Java中net.rim.device.api.system.Branding类的典型用法代码示例。如果您正苦于以下问题:Java Branding类的具体用法?Java Branding怎么用?Java Branding使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Branding类属于net.rim.device.api.system包,在下文中一共展示了Branding类的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;
}