移动设备的应用平台—J2ME 简介.doc_第1页
移动设备的应用平台—J2ME 简介.doc_第2页
移动设备的应用平台—J2ME 简介.doc_第3页
移动设备的应用平台—J2ME 简介.doc_第4页
移动设备的应用平台—J2ME 简介.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Mobile application platform-J2ME profile1. what is the J2MEJ2ME (Java 2 Micro Edition) is a Java 2 as an integral part of it with J2SE, J2EE said. According to Suns definition: J2ME is a highly optimized Java runtime environment, mainly for consumer electronics devices such as cellular phones and video phones, digital set-top boxes, car navigation systems and so on. J2ME technology in 1999, the JavaOne Developer Conference on the formal launch of the General Assembly, which will of the Java language and platform-independent features into a small electronic device that allows mobile wireless devices sharing between applications.J2ME in its design specifications, to follow a variety of devices to create a single development system is meaningless the basic principles. So first of all J2ME embedded devices generally divided into two types: One is the limited computing, power supply is also limited embedded devices (for example, PDA, cell phone); another kind of computing power is relatively better, And in the power supply is relatively sufficient for embedded devices (for example, air conditioners, refrigerators, TV set-top boxes (set-top box). Because these two types of embedded devices, Java is why the introduction of a concept called Configuration, and then the operation of the above features are limited, limited the power of the device embedded in the definition of Connected Limited Device Configuration (CLDC) specifications are; and the other one To standardize the types of devices are Connected Device Configuration (CDC) specifications. In other words, J2ME first of all embedded devices using the Configuration concept of separate into two kinds of abstract patterns.In fact, everyone here can be a Configuration for J2ME two types of specifications for embedded devices, which defines the specifications of these devices at least in line with the computing power and capacity of power supply, memory, and other norms Size, as well as set A set of these devices on the implementation of the Java program can be used by the type of library, these norms are defined by the type of library for the Java standard librarys core categories and sub-type device features the line The expansion of the library category. For example, on CLDC specifications, can support the core category for the library java.lang .*, java.io. *, java.util .*, and support the expansion of the category for the library java.microedition.io. *. A distinction between the two main Configuration after, J2ME and then in the definition of the concept of a Profile. Profile is a framework in the Configuration on the specifications. The reason why there is the concept of the Profile in order to more clearly separate the various areas of embedded Java devices, as well as how to develop the procedures they should have the function of what. Therefore Profile of the definition of embedded devices are very specific and related to the expansion of the types of libraries, and the Java program embedded in a variety of devices on a user interface that shows how the definition of the Profile is inside. Profile of the expansion of the definition of the type of library is based on the underlying Configuration within the definition of the core categories established by the library.2. Whats New in the J2ME Wireless Toolkit 2.2The award-winning J2ME Wireless Toolkit has become the de facto standard toolkit for developing applications for Java 2, Micro Edition (J2ME). Since its debut in 2000, the toolkit has evolved to keep pace with the rapidly changing face of mobile Java technology. Dont be misled by the small change in version number from 2.1. The new toolkit supports new optional APIs specified through the Java Community Process (JCP) in four vital areas: 3D graphics, multimedia messaging, Bluetooth networking,and data management.In this article Ill describe these new APIs and show you how theyre implemented in the toolkit.Before I do, take a moment to admire the updated DefaultColorPhone emulator skin. Since version 2.1, this skin has gotten a larger screen (320 x 240, or QVGA) and far more colors (4096 instead of 256).2.1 Mobile 3D Graphics:JSR 184, the Mobile 3D Graphics API for J2ME (M3G), provides three-dimensional graphics functionality in a compact package thats appropriate for devices that support the most widely adopted J2ME software stack, the Connected, Limited Device Configuration (CLDC) and the Mobile Information Device Profile (MIDP). The API provides two APIs for displaying 3D content. The immediate mode API makes it possible for applications to create and manipulate 3D elements directly. On top of this layer is a scene graph API, also called retained mode, that makes it possible to load and display entire 3D scenes youve designed ahead of time. Applications may use whichever API is most appropriate, or a combination of retained mode and immediate mode. The JSR 184 specification also defines a file format for scene graphs, .m3g.The toolkits emulator fully supports JSR 184 and youll find several MIDlets that show off the APIs capabilities in the Demo3D project.Life3D demonstrates the use of immediate mode: PogoRoo is an interactive demonstration that features a bouncing kangaroo:Finally, retainedmode shows how to load and render a scene graph file:2.2 Multimedia Messaging:The J2ME Wireless Toolkit has long supported JSR 120, version 1.1 of the Wireless Messaging API (WMA); the new release supports WMA 2.0 (JSR 205), which expands WMAs capabilities to include Multimedia Messaging.In the toolkit, messaging takes place in a simulated environment. If you run the emulator multiple times, applications on the emulators can communicate with each other, and you can use the toolkits handy WMA Console utility to exchange messages with the applications in the same environment. Messages may conform to any of three standard protocols: Short Message Service (SMS), Cell Broadcast Service (CBS), or - new in version 2.2 of the toolkit - Multimedia Messaging Service (MMS).You can address MMS messages and add any collection of files to the message.Furthermore, the network monitor now displays MMS messages that are sent or received by the emulator.2.3 Bluetooth and OBEX:The J2ME Wireless Toolkit emulator supports JSR 82, the Java APIs for Bluetooth, which includes two independent APIs:The Bluetooth API provides an interface to Bluetooth wireless networking, including device discovery and data exchange.The OBEX API allows applications to use the Object Exchange (OBEX)protocol over Bluetooth or other communication channels.The toolkit allows you to develop and test applications that use Bluetooth technology even if you dont have any actual Bluetooth hardware. The toolkit simulates a Bluetooth environment, in which you can run multiple emulator instances that can discover each other and exchange data using the Bluetooth API.An example application, BluetoothDemo, shows how to transfer imagesfrom one emulator to another.The J2ME Wireless Toolkit implements OBEX transfer over simulated Bluetooth and infrared connections. The simulated infrared connectionfollows the IrDA standard defined by the Infrared Data Association. The toolkit simulates infrared transfers between multiple running emulators.You can configure the Bluetooth and OBEX environment using the Bluetooth/OBEX tab in the toolkit preferences. This controls suchparameters as how long the emulator attempts to discover other devices in the simulated Bluetooth environment and the maximum packet size. See the toolkits Users Guide for more details.2.4 Wireless development kit(WTK):WTK full name is from J2ME Wireless Toolkit - from Wireless development kit. This kit are designed to help developers simplified from j2me development process. Use one of the tools can develop with the Wireless Technology for Java (JSR 185, judge not JTWI standardizing compatible equipment running on j2me applications. The kit contains a full set of generation tool, practical procedures and equipment emulator. When writing to text so far can gain four versions, respectively is 1.0.4, 2.0, 2.1 and 2.2. Each version is including English, Japanese, simplified Chinese character, traditional Chinese four languages in the bag. Provide a WTK is from development kit. At present each big phone makers tend to pass their simplification and WTK disguised himself, and launch suitable products, like SonyEricsson, Nokia Developer s suit, etc., all belong to this type, And through Eclipse etc, JBuilder IDE, J2ME setups tools can be bound in these integrated development environment, further improve the efficiency of development.No matter which version WTK will include the following categories:Appdb directory: the RMS information from a databaseApps directory: WTK own produce professional demo programsBin directory: J2ME development tools executable filesDocs directory: all kinds of help and documentationThe lib directory: J2ME program libraries, Jar wrapped and control documentsSession directory: performance monitoring conservation informationWtklib directory: JWTK main program and simulator appearance.2.5 J2me digital signature :Get a certificate of the j2me jad files for signature. Here are some and autograph related need to pay attention to some problems. 1. Want to install signed the software, you must pass jad to install. We know the j2me program generator will have the jar jad and two files, in the ordinary circumstances we only need to install the jar file is ok. For example I would jar file via bluetooth to phone, install later. But if you want to through installed manually signed documents, will pass through jad to install, and ensure that jad and jar file is in the same directory. My way is through the data will be two files into mobile phone memory or covering the card, then through jad to install, this installation, good software is software that has signed. Wont have always annoying asking users are allowed to operate the tooltip. But Ive seen mobile opinion, should be different mobile phones have different performance. Such as SONY Ericsson mobile phone about clew is still require the user to set themselves up. Nokia also. Only nokia in using the signature software users cannot set to always allow or only hint again. And signed can be set up. 2. Programming staff need to pay attention to, like many functions in the unsigned is before can use, such as GPS, network connection, and file for reading and writing. 3. Signed software what benefits. Signature is told us this software is credible, user the directest feeling is networking or visit the mobile phone files, transceiver SMS, MMS, bluetooth etc, but after signed these functions are available. Part This is jad MIDlet - Permissions attribute in the problem. When unsigned attributes to this request is not strictly, but after signed must note. Must put to use to access to join in, otherwise this function cannot be used. Below are some commonly used MIDlet - Permissions attributes.2.6 Local Files and Personal Information:The J2ME Wireless Toolkit supports JSR 75, the PDA Optional Packages for the J2ME Platform, which also includes two independent APIs:The FileConnection API gives MIDlets access to a local file system on the device. The Personal Information Management (PIM) optional package includes APIs for manipulating contact lists, calendars, and to-do lists.A real device may have a local file system which can be accessed using the FileConnection API. In the J2ME Wireless Toolkit emulator, a simulated file system is maintained as a directory on your hard disk.The files your application can access using FileConnection are stored in subdirectories of appdbfilesystem, where is the installation directory of the J2ME Wireless Toolkit and is the name of the emulator skin. For example, the DefaultColorPhone emulator skin comes with a root directory install

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论