Development and transplantation of mobile games for DoJa platform

Source: Internet
Author: User
Tags command line

I. Introduction to DOJA Technology

Simply put, DoJa is the patented technology of NTT DoCoMo, Japan's largest mobile communications company. I-mode is an application model for the 2.5G phase of mobile communications, which covers many aspects. I-mode was originally in 1999, and I-mode with Java I-appli Service was born in 2001, the Java-developed language I-mode is called DoJa Technology, DoJa technology is actually based on the CLDC specification platform technology, With the J2ME standard platform is parallel. There is a separate API class library. Mobile communication programs developed on the J2ME standard platform are called MIDP programs that conform to MIDP1.0 or 2.0 specifications. And the program developed on the DoJa platform is called the APPLI program. DoJa now has many versions. Maximum version DoJa4.0.

Second, Dojaapi preview

Let's take a look at some of the features of the DoJa2.5 version of the API that is now common.
The 2.5 version includes the following packages:

Com.nttdocomo.device Contains classes that can control the device, such as the camera class
Com.nttdocomo.io Contains some classes under the framework of the GCF (Generic Connection framework) of CLDC
Com.nttdocomo.lang Contains language classes
Com.nttdocomo.net Contains classes for network communications
Com.nttdocomo.opt.ui Contains some optional classes to create the user interface
Com.nttdocomo.opt.ui.j3d Contains classes that can create 3D graphics and is optional
Com.nttdocomo.system Contains some classes that can be used for local terminal functions, such as operating a mobile phone book, sending and receiving emails, etc.
Com.nttdocomo.ui Contains a number of classes for creating a user interface
Com.nttdocomo.util Contains some tool classes
It can be seen that DOJAAPI is richer than standard J2ME. Generally in the development and migration process, often encountered by the class library is the Com.nttdocomo.ui package, so we have a general look at what are the classes here. This package contains the entry class for the APPLI program, the IApplication class, the APPLI program's user interface (GUI) is also a high-level interface and low-level interface, but their inheritance is a bit confusing, such as the component class is defined for the high-level interface of the abstract class, it has nine subclasses. Contains some of the buttons, labels, and text boxes for some of the classes. is actually some component. is not a container class. The frame class is also an abstraction, meaning that it can be represented as a frame or container.
Its subclasses have canvas,dialog,panel. Where Dialog and Panel belong to advanced interface classes, and canvas to low-level interfaces. The class used to display the interface is called display, and its display screen method is setcurrent (frame f), where the parameter is a frame class object. This shows that subclasses like the component type cannot be displayed independently on the interface, and are added by using the Advanced interface class in the frame subclass. It must be placed on the panel before it can be displayed.
Others are graphics,graphics2d,graphics3d classes for drawing, Mediamanager classes for loading media resources, and so on. Because the class is many, and the function is complex and formidable, does not introduce each, may refer to the API document further study.
Third, appli program development
Below we use a small program to explain how to develop a appli program. 工欲善其事 its prerequisite, we're going to download a doja dedicated simulator.
Fortunately, DoJa's API documentation and simulators, as well as the use of methods in the http://www.doja-developer.net are all already given. Download the corresponding DoJa2.5 version of the simulator. The name is Javaappli Development Kit for DoJa-2.5 version 1.03, then install on it.
When you turn on the emulator, a window like WTK will appear, and a cell phone emulator window will appear together, as well as a command line mode window.
Take a closer look, in fact, the interface function is very concise, the menu bar has files, engineering, editing, equipment, help a few options, toolbars include new projects, open projects, ADF configuration, create, run these options. Here are some options for running the model. Of course, these items are all in English. What is an ADF configuration? The installer for Appli also includes a jar packaging file and a description file, with the different type. Jam. And the settings in the ADF are equivalent to the setting in the WTK. That is, the project for jam file description. OK, let's start with a new project, and click on Project, and there will be a hint window for you to enter the project name, and there's a reference engineering option on it. The name of our project is called Test_doja. Point create creation.
And then in this window we'll show you some of the information we created. For example, my simulator installation path is D-packing directory. The following message is displayed:
Placed Java source files in D:\jDKDoJa2.5\apps\Test_doja\src Placed resource files in D:\jDKDoJa2.5\apps\Test_doja\res Pl aced scratchpad file in D:\JDKDOJA2.5\APPS\TEST_DOJA\SP
Description in the simulator Apps directory, is the project directory we created. There are also three folders, SCR is used to put the. java file, res is used to put resources, the SP is used to store scratchpad files. This scratchpad should be discussed in detail here. Appli mode is simply to say that the customer mobile phone through the connection I–mode server to obtain other network resources. These resources can come from different sites. Mobile phone with a similar hard disk area used to store these resources, called Scratchpad, the general DoJa mobile phone games are first downloaded from the network resources to the scratchpad, and then read from the scratchpad to use. And Scrtchpad is writable and can save game information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.