骑猪闯天下

J2ME随笔,记录成长的脚步

统计

留言簿(3)

阅读排行榜

评论排行榜

[J2ME-原创] MIDlet属性

1. J2ME在开发时,有时需要读取手机的属性,经常用经常忘,现总结下:



    
//手机平台型号
    String platform = System.getProperty("microedition.platform");
    
//SMS服务中心号码
    String _smscno = System.getProperty("wireless.messaging.sms.smsc");
    
    
//CLDC版本属性
    String cldc = System.getProperty("microedition.configuration");
    
//MIPD版本属性
    String midp = System.getProperty("microedition.profiles");
    
    
//关于软件相关信息
    String midletVendor =System.getProperty("MIDlet-Vendor");
    String description 
=System.getProperty("MIDlet-Description");
    String version 
= System.getProperty("MIDlet-Version");    
    String dataSize 
= System.getProperty("MIDlet-Data-Size");    
    String midletName 
= System.getProperty("MIDlet-Name");
    String midletJarSize 
=System.getProperty("MIDlet-Jar-Size");
    String midletJarURL 
=System.getProperty("MIDlet-Jar-URL");
    
    
    
//系统编码
    String encoding = System.getProperty("microedition.encoding");
    
//区域设置
    String locale = System.getProperty("microedition.locale");
    
//判断是否支持MMAPI
    String mmapi = System.getProperty("microedition.media.version");
    
//判断是否支持蓝牙
    String bluetooth = System.getProperty("bluetooth.api.version");
    
//判断是否支持个人信息管理
    String pim = System.getProperty("microedition.pim.version");
    
//判断是否支持文件系统
    String file = System.getProperty("microedition.io.file.FileConnection. version");
    
//判断是否支持SIP
    String sip = System.getProperty("microedition.sip.version");
    
//判断是否支持M3G
    String m3g = System.getProperty("microedition.m3g.version");


2. MIDlet属性如下

&& MIDlet属性读取" alt="MIDlet套件 && MIDlet属性读取" src="http://static12.photo.sina.com.cn/middle/4b3c1f95t7cf30782feeb&690" real_src="http://static12.photo.sina.com.cn/middle/4b3c1f95t7cf30782feeb&690">


<End>
骑猪闯天下


posted on 2010-04-15 16:48 骑猪闯天下 阅读(399) 评论(0)  编辑  收藏


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


网站导航: