跳至主要内容

关于 MIDP 和 WMA

SUN的官方网站上所列出的Java Verified机型中,几乎所有支持MIDP 2.0的移动设备都支持WMA API,也就是JSR 120或是JSR 205。但是这并不意味着所有MIDP 2.0的设备都支持WMA。因为MIDP 2.0(JSR 118)并没有明确要求必须同时支持JSR 120或是JSR 205。因此这二者的关系并不是依赖的,实际机型的支持要取决于特定的设备制造商(vendor)。

同样的,支持MIDP 1.0的设备也有可能支持WMA,像是Nokia 3300。
http://www.forum.nokia.com/devices/3100

以下是支持JSR 120的设备列表:
http://www.j2mepolish.org/devices/devices-wmapi.html
http://developers.sun.com/techtopics...st.do?apiId=42

虽然MIDP 2.0并没有明确强制设备实现WMA(JSR 120),但是Java Technologies for Wireless Industry (JSR 185),简称为JTWI,定义了设备必须实现的一系列组件。满足JTWI的设备必须在实现MIDP 2.0的同时也支持JSR 120。值得一提的是,JTWI的后继规范,简称MSA (JSR 248),试图消除Java实现的API分裂,它要求设备必须实现JSR 205。满足JTWI的设备一定支持WMA 1.1,WMA 2.0扩展了JSR 120并加入了对于MMS,即彩信的支持。因此支持WMA 2.0的手机也可以运行WMA 1.1编译的程序。

WMA 1.1 规范:
JSR-120: The WMA 1.1 specification includes changes to take into account the MIDP 2.0 security framework and push architecture.
JSR 205 : This JSR will extend and enhance the Wireless Messaging API (JSR-000120)
Development Tools: The J2ME Wireless Toolkit 2.0 supports WMA 1.1, allowing application developers to easily emulate sending and receiving SMS and CBS messages between multiple device emulators based on MIDP 2.0.

WMA 1.0 规范:
JSR 120: This is the original specification for JSR 120
WMA Recommended Practice: This document, defined by the JSR 120 expert group, provides implementation notes for platform developers deploying WMA 1.0 on a MIDP 2.0 implementation. Please note that the WMA 1.1 specification supersedes this recommend practice.
REF:http://java.sun.com/products/wma/

WMA 1.1中引入的一个新特性是对于MIDP 2.0中Push Registry技术的支持。WMA 1.0是不可以使用Push Registry的。Push Registry允许MIDlet处理SMS和CBS消息——即便当设备收到消息的时候MIDlet尚未启动。WMA 1.1被加强之后作为WMA 2.0发布在JSR 205中,二者的主要差别在于是否支持MMS中使用的multi-part messages。

WMA 2.0 定义了'Message'的三个subinterface(子接口),包括:
  • 'BinaryMessage' SMS的二进制消息格式.
  • 'TextMessage' SMS的文本消息格式.
  • 'MultipartMessage' MMS的多媒体消息格式.

参考资料:
http://discussion.forum.nokia.com/forum/showthread.php?t=99524

评论