BlackBerry系统属性
本章介绍BlackBerry系统属性,包括CLDC/MIDP/JTWI,MMAPI,PDAP,LAPI,SATSA,CHAPI,I18N,Bluetooth,WMA, JAX-RPC,JAXP,Browser。列表1列出各系统属性类别。
Property Categories | 属性分类 |
CLDC | 运算功能有限、电力有限的嵌入式装置规格 |
MIDP | 使用CLDC配置设备的用户界面相关的规范 |
JTWI | J2ME的运行环境规范,提供了一个标准的更加严格的运行环境 |
MMAPI | 多媒体规范 |
PDAP | PDA规范 |
LAPI | 地理位置信息规范 |
SATSA | 安全信任API |
CHAPI | 文件处理API |
I18N | 国际化API规范 |
Bluetooth | 蓝牙规范 |
WMA | 无线短信 |
JAX-RPC | 访问WEB服务的规范 |
Browser | 浏览器规范 |
列表 1
CLDC/MIDP/JTWI的系统属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
- microedition.encoding
属性:代表手机默认的字符集名称
返回值:“ISO-8859-1”
- microedition.configuration
属性:代表手机支持的CLDC版本
返回值:“CLDC-1.1”
- microedition.profiles
属性:代表手机支持的MIDP版本
返回值: “MIDP-2.1”
- microedition.platform
属性:代表手机的品牌和型号
返回值:“BlackBerry9700/5.0.0.566”
- microedition.locale
属性:代表手机所在的国家或地区
返回值:“zh-CN”
- microedition.jtwi.version
属性:代表手机支持的JTWI版本
返回值:“1.0”
- user.timezone
属性:用户时区
返回值:“Asia/Hong_Kong”
MMAPI属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
1. microedition.media.version
属性:代表手机支持的MMAPI版本
返回值: “1.1”
2. supports.mixing
属性:代表手机是否支持混音(同时播放多个Player)
返回值: “false”
3. supports.audio.capture
属性:代表手机是否支持声音捕获(录音)
返回值: “true”
4. supports.video.capture
属性:代表手机是否支持视频捕获(录像)
返回值: “true”
5. supports.recording
属性:代表手机是否支持记录(record),
返回值: “true”
6. audio.encodings
属性:代表手机支持的声音格式
返回值: “encoding=audio/amr encoding=pcm encoding=gsm”,多种支持格式之间有一空格隔开。
7. video.encodings
属性:代表手机支持的视频格式
返回值: “encoding=video/3gpp&mode=standard encoding=video/3gpp&mode=mms encoding=video/3gpp&width=480&height=360&video_codec=MPEG-4&audio_codec=AMR encoding=video/3gpp&width=176&height=144&video_codec=MPEG-4&audio_codec=AMR encoding=video/3gpp&width=480&height=360&video_codec=MPEG-4&audio_codec=PCM …”;返回值包括多种支持的视频格式,它们之间有一空格隔开。
8. video.snapshot.encodings
属性:代表手机使用getSnapshot方法获得的视频快照格式
返回值: “encoding=rgb565 encoding=jpeg&width=2048&height=1536&quality=superfine encoding=jpeg&width=2048&height=1536&quality=normal encoding=jpeg&width=2048&height=1536&quality=fine encoding=jpeg&width=1024&height=768&quality=normal
encoding=jpeg&width=1024&height=768&quality=fine …”;返回值包含多种格式,它们之间有一空格隔开。
PDAP属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
- microedition.pim.version
属性:代表手机支持的PIM API版本
返回值: “1.0”
- microedition.io.file.FileConnection.version
属性:代表手机支持的FC API版本
返回值: “1.0”
- file.separator
属性:代表手机支持的FC API版本
返回值: “/”
- fileconn.dir.photos
属性:代表手机中存储照片和其它图片的目录
返回值: “file:///store/home/user/pictures/”
- fileconn.dir.photos.name
属性:代表手机中图片目录的名称
返回值: “图片”
- fileconn.dir.videos
属性:代表手机中存储视频的目录
返回值: “file:///store/home/user/videos/”
- fileconn.dir.videos.name
属性:代表手机中存储视频的目录名称
返回值:“视频”
- fileconn.dir.tones
属性:代表手机中存储声音的目录
返回值: “file:///store/home/user/ringtones/”
- fileconn.dir.tones.name
属性:代表手机中存储声音的目录名称
返回值: “铃声”
10. fileconn.dir.music
属性:代表手机中音乐的目录
返回值:“file:///store/home/user/music/”
- fileconn.dir.music.name
属性:代表手机中音乐的目录名称
返回值: “音乐”
- fileconn.dir.memorycard
属性:代表手机中存储卡的目录
返回值:“file:///SDCard”
- fileconn.dir.memorycard.name
属性:代表手机中存储卡的名称
返回值: “媒体卡”
- fileconn.dir.memorycard.photos
属性:代表存储卡中照片目录
返回值:“file:///SDCard/BlackBerry/pictures/”
- fileconn.dir.memorycard.photos.name
属性:代表存储卡中照片目录名称
返回值:“图片”
- fileconn.dir.memorycard.video
属性:代表存储卡中视频目录
返回值:“null”;BlackBerry9700 SD卡上没有专门的视频目录
- fileconn.dir.memorycard.video.name
属性:代表存储卡中视频目录名称
返回值:“null”;BlackBerry9700 SD卡上没有专门的视频目录
- fileconn.dir.memorycard.tones
属性:代表存储卡中铃声目录
返回值:“file:///SDCard/BlackBerry/ringtones/”
- fileconn.dir.memorycard.tones.name
属性:代表存储卡中铃声目录名称
返回值:“铃声”
- fileconn.dir.memorycard.music
属性:代表存储卡中音乐目录
返回值:“file:///SDCard/BlackBerry/music/”
- fileconn.dir.memorycard.music.name
属性:代表存储卡中音乐目录
返回值:“音乐”
LAPI 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
1. microedition.location.version
属性:代表手机支持的Location API版本
返回值:“1.0.1”
SATSA 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
1. microedition.satsa.version
属性:代表手机支持的安全信任API的版本
返回值:“1.0”
2. microedition.smartcardslots
属性:代表手机支持的smart card插槽信息
返回值:“0C”
CHAPI 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
1. microedition.chapi.version
属性:代表手机支持的CH(Content Handler) API(JSR211)版本
返回值:“1.0”
I18N 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
1. microedition.global.version
属性:代表手机支持的Mobile Internationalization API(JSR-238)版本
返回值:“1.0”
Bluetooth 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
- microedition.bluetooth.version
属性:代表手机支持的蓝牙版本
返回值:“1.1”
- bluetooth.api.version
属性:代表手机支持的蓝牙API版本
返回值:“1.1”
- obex.api.version
属性:代表手机支持的蓝牙API版本
返回值:“1.1”
- bluetooth.l2cap.receiveMTU.max
属性:代表手机支持的蓝牙使用L2CAP连接每次接收数据的最大缓存
返回值:“1024”
- bluetooth.connected.devices.max
属性:代表手机通过蓝牙最多连接蓝牙设备的个数
返回值:“5”
- bluetooth.connected.inquiry
属性:在连结时是否允许调查
返回值:“true”
- bluetooth.connected.page
属性:在连结时是否允许传呼
返回值:“true”
- bluetooth.connected.inquiry.scan
属性:在连结时是否允许扫描
返回值:“true”
- bluetooth.connected.page.scan
属性:在连结时甚否允许传扫描
返回值:“true”
- bluetooth.master.switch
属性:使否允许主/从开关
返回值:“false”
- bluetooth.sd.trans.max
属性:并行服务发现交易的最大数
返回值:“1”
- bluetooth.sd.attr.retrievable.max
属性:每个服务纪录撷取的最大服务属性
返回值:“10”
WMA 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
- wireless.messaging.mms.mmsc
属性:传回在设备上使用JSR-205的MMSC位址
返回值:“http://mmsc.monternet.com/url”
- wireless.messaging.sms.smsc
属性:SMS位址的表示使用下列BNF定义的msisdn项目来表示语法:
msisdn ::== "+" digits | digits
digit ::== "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |"8 " | "9"
digits ::== digit | digit digits
返回值:“+8613800100500”
JAX-RPC 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
1. xml.rpc.subset.version
属性:设备支援的JAX-RPC Subset API版本
返回值:“1.0”
JAXP 属性
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
2. xml.jaxp.subset.version
属性:设备支援的JAXP Subset API版本
返回值:“1.0”
Browser
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700的值:
1. browser.useragent
属性:http请求的 useragent, 判断请求来源于电脑还是手机
返回值:“BlackBerry9700/5.0.0.566 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/1”
BlackBerry手机上的属性
Integer.toHexString(DeviceInfo.getDeviceId()).toUpperCase();
属性:获取PIN码
返回值:21F39330
DeviceInfo.getBatteryLevel();
属性:获取电池水平
返回值:92
DeviceInfo.getBatteryStatus();
属性:获取电池状态
返回值:5
DeviceInfo.getBatteryTemperature();
属性:获取电池温度
返回值:23
DeviceInfo.getBatteryVoltage();
属性:获取电池电压
返回值:4190
DeviceInfo.getDeviceName();
属性:获取手机名称
返回值:9700
DeviceInfo.getManufacturerName();
属性:获取手机生产商
返回值:Research In Motion
DeviceInfo.getOSVersion();
属性:获取手机OS版本
返回值:83951761
DeviceInfo.getPlatformVersion();
属性:获取手机平台版本
返回值:5.1.0.145
DeviceInfo.getSoftwareVersion();
属性:获取手机软件版本
返回值:5.0.0.566
DeviceInfo.getTotalFlashSize();
属性:获取手机Flash内存大小
返回值:262144000
DeviceInfo.hasCamera();
属性:是否有摄像头
返回值:true
DeviceInfo.isBatteryRemovable();
属性:是否可拔电池
返回值:true
DeviceInfo.isInHolster();
属性:手机是否在皮套里或滑盖是否关闭
返回值:false
DeviceInfo.isPasswordEnabled();
属性:是否有密码保护
返回值:true
DeviceInfo.isSimulator();
属性:是否是模拟器
返回值:false