`

BB属性

阅读更多
本章介绍BlackBerry 系统属性,包括CLDC/MIDP/JTWI,MMAPI,PDAP,LAPI,SATSA,CHAPI,I18N,Bluetooth,WMA, JAX-RPC,JAXP,Browser。列表1 列出各系统属性类别。



CLDC/MIDP/JTWI 的系统属性

使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700 的

值:

1. microedition.encoding

属性:代表手机默认的字符集名称

返回值:“ISO-8859-1”

2. microedition.configuration

属性:代表手机支持的CLDC 版本

返回值:“CLDC-1.1”

3. microedition.profiles

属性:代表手机支持的MIDP 版本

返回值: “MIDP-2.1”

4. microedition.platform

属性:代表手机的品牌和型号

返回值:“BlackBerry9700/5.0.0.566”

5. microedition.locale

属性:代表手机所在的国家或地区

返回值:“zh-CN”

6. microedition.jtwi.version

属性:代表手机支持的JTWI 版本

返回值:“1.0”

7. 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 的

值:

1. microedition.pim.version

属性:代表手机支持的PIM API 版本

返回值: “1.0”

2. microedition.io.file.FileConnection.version

属性:代表手机支持的FC API 版本

返回值: “1.0”

3. file.separator

属性:代表手机支持的FC API 版本

返回值: “/”

4. fileconn.dir.photos

属性:代表手机中存储照片和其它图片的目录

返回值: “file:///store/home/user/pictures/”

5. fileconn.dir.photos.name

属性:代表手机中图片目录的名称

返回值: “图片”

6. fileconn.dir.videos

属性:代表手机中存储视频的目录

返回值: “file:///store/home/user/videos/”

7. fileconn.dir.videos.name

属性:代表手机中存储视频的目录名称

返回值:“视频”

8. fileconn.dir.tones

属性:代表手机中存储声音的目录

返回值: “file:///store/home/user/ringtones/”

9. fileconn.dir.tones.name

属性:代表手机中存储声音的目录名称

返回值: “铃声”

10. fileconn.dir.music

属性:代表手机中音乐的目录

返回值:“file:///store/home/user/music/”

11. fileconn.dir.music.name

属性:代表手机中音乐的目录名称

返回值: “音乐”

12. fileconn.dir.memorycard

属性:代表手机中存储卡的目录

返回值:“file:///SDCard”

13. fileconn.dir.memorycard.name

属性:代表手机中存储卡的名称

返回值: “媒体卡”

14. fileconn.dir.memorycard.photos

属性:代表存储卡中照片目录

返回值:“file:///SDCard/BlackBerry/pictures/”

15. fileconn.dir.memorycard.photos.name

属性:代表存储卡中照片目录名称

返回值:“图片”

16. fileconn.dir.memorycard.video

属性:代表存储卡中视频目录

返回值:“null”;BlackBerry9700 SD 卡上没有专门的视频目录

17. fileconn.dir.memorycard.video.name

属性:代表存储卡中视频目录名称

返回值:“null”;BlackBerry9700 SD 卡上没有专门的视频目录

18. fileconn.dir.memorycard.tones

属性:代表存储卡中铃声目录

返回值:“file:///SDCard/BlackBerry/ringtones/”

19. fileconn.dir.memorycard.tones.name

属性:代表存储卡中铃声目录名称

返回值:“铃声”

20. fileconn.dir.memorycard.music

属性:代表存储卡中音乐目录

返回值:“file:///SDCard/BlackBerry/music/”

21. 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 的

值:

1. microedition.bluetooth.version

属性:代表手机支持的蓝牙版本

返回值:“1.1”

2. bluetooth.api.version

属性:代表手机支持的蓝牙API 版本

返回值:“1.1”

3. obex.api.version

属性:代表手机支持的蓝牙API 版本

返回值:“1.1”

4. bluetooth.l2cap.receiveMTU.max

属性:代表手机支持的蓝牙使用L2CAP 连接每次接收数据的最大缓存

返回值:“1024”

5. bluetooth.connected.devices.max

属性:代表手机通过蓝牙最多连接蓝牙设备的个数

返回值:“5”

6. bluetooth.connected.inquiry

属性:在连结时是否允许调查

返回值:“true”

7. bluetooth.connected.page

属性:在连结时是否允许传呼

返回值:“true”

8. bluetooth.connected.inquiry.scan

属性:在连结时是否允许扫描

返回值:“true”

9. bluetooth.connected.page.scan

属性:在连结时甚否允许传扫描

返回值:“true”

10. bluetooth.master.switch

属性:使否允许主/从开关

返回值:“false”

11. bluetooth.sd.trans.max

属性:并行服务发现交易的最大数

返回值:“1”

12. bluetooth.sd.attr.retrievable.max

属性:每个服务纪录撷取的最大服务属性

返回值:“10”

WMA 属性

使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700 的

值:

1. wireless.messaging.mms.mmsc

属性:传回在设备上使用JSR-205 的MMSC 位址

返回值:“http://mmsc.monternet.com/url”

2. 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

12

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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics