posts - 310, comments - 6939, trackbacks - 0, articles - 3
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

J2ME开发中常见属性(Property)及其作用列表(ZZ)

Posted on 2010-03-03 11:39 诗特林 阅读(321) 评论(0)  编辑  收藏 所属分类: J2ME
microedition.configuration
代表手机支持的CLDC版本,返回格式值为“CLDC-1.0”或“CLDC-2.0”
microedition.platform
microedition.jtwi.version
代表手机支持的JTWI版本,值必须是“1.0”
表2 可选包属性
microedition.location.version
代表手机支持的Location API版本,如果不支持则返回null
microedition.io.file.
FileConnection.version
代表手机支持的FC API版本,如果不支持则返回null
microedition.global.version
代表手机支持的Mobile Internationalization API(JSR-238)版本,如果不支持则返回null
microedition.chapi.version
代表手机支持的CH(Content Handler) API(JSR211)版本,如果不支持则返回null
microedition.sip.version
代表手机支持的SIP API版本,如果不支持则返回null
表3 MMAPI属性
supports.audio.capture
代表手机是否支持声音捕获(录音),返回值为“true”或“false”
video.snapshot.encodings
代表手机使用getSnapshot方法获得的视频快照格式,返回值格式为“encoding=png”,多个格式之间使用至少一个空格进行间隔
表4 Wireless Messaging API属性
wireless.messaging.sms.smsc
代表手机发送短信时的短信服务中心号码
表5 FileConnection API
fileconn.dir.photos
代表手机中存储照片和其它图片的目录,例如“file:///c:/My files/ Images /”
fileconn.dir.videos
代表手机中存储视频的目录,例如“file:///c:/My files/Video clips/”
fileconn.dir.memorycard
代表手机中存储卡的根目录。例如“file:///d:/”
代表手机中MIDlet的私有工作目录,例如“file:///c:/System/MIDlets/[1015f294]/scratch”
fileconn.dir.photos.name
代表手机中图片目录的名称,例如“Images”
fileconn.dir.videos.name
代表手机中视频目录的名称,例如“Video clips”
fileconn.dir.tones.name
代表手机中声音目录的名称,例如“Sound clips”
fileconn.dir.memorycard.name
代表手机中存储卡的名称,例如“Memory card”
         使用这些属性,可以获得在程序运行过程中需要的很多和系统相关的信息,也可以使用表2中的属性来获得手机是否支持对应的可选包等信息。
                   String >
         注意:如果需要获得JVM或jad文件中的信息,需要使用MIDlet类中的getAppProperty方法,其属性名则需要查阅jad文件的设定,和本文所述的属性名无关。

只有注册用户登录后才能发表评论。


网站导航: