OPhone Platform Architecture and main development components (1)

Source: Internet
Author: User

OPhone Platform Architecture

The OPhone platform consists of the underlying operating system, local system library, OPhone running environment, Widget running environment, application framework, and applications. OPhone platform structure 1 is shown in:


The OPhone platform is based on the Linux 2.6 kernel and provides system services for upper-layer systems, such as security, memory management, thread management, network protocol stack, and driver model. The powerful functions of the OPhone platform come from the underlying local libraries, including the multimedia engine OpenCORE, browser engine WebKit, 2D graphics engine SGL, and relational database SQLite. These local libraries provide programming interfaces to developers through the upper-layer application framework, and the local library and application framework are connected through JNIJava Native Interface. The OPhone platform provides an open runtime environment for applications. Whether it is a built-in application or an application subsequently installed, all applications have the same ability to access the underlying framework, developers can use the APIS provided by the application framework to develop their own applications.

Application Model on OPhone

The latest OPhone 1.5 platform supports the following three applications. This article mainly introduces the OPhone application model.

OPhone applications written in java are released in APK format.

Widget programs written in HTML, JavaScript, and other scripting languages are released in the form of WGT.

The MIDlet program written in java is released in jar/jad format.

The APK file runs in the Dalvik virtual machine. The Dalvik virtual machine is different from the ordinary Java virtual machine. It is optimized for embedded devices, and the class file is also converted. dex file format ,. the dex file format is more compact and execution efficiency is higher. When the APK application is running, OPhone starts a Linux Process and the application runs in its own process. Each process has its own Java virtual machine. The Code of different applications runs independently and does not affect each other.

APK is a file compatible with the zip file format. The OPhone SDK provides the aapt tool to package class files and resource files into APK files, the packaging process includes converting class files to dex files, generating resource tables, and optimizing XML files in text format. The conversion process 2 is shown below:

Main development components

OPhone applications are usually composed of Activity, Content Provider, Service, and BroadcastReceiver. Although each item is not mandatory, mastering these development components is the primary task of learning OPhone application development. The following describes the main development components of the OPhone application one by one.

  • How to get started with Ophone Widget SDK
  • Quick Start: getting started with Ophone and Android
  • How to port a j2-api to OPhone
  • Combat between Android platform and OPhone
  • Explanation of Native Development and JNI mechanism on OPhone Platform

Activity

On the surface, Activity is an interface of the OPhone application. You can use this interface to operate the player, view contacts, or play games. For developers, Activity is the entry to the OPhone application. The OPhone application model does not define entry methods like main (), but defines a series of lifecycle methods in the Activity class, for example, onCreate (), onResume (), onStart (), onPause (), onStop (), and onDestroy (), the OPhone system will call the corresponding lifecycle method when appropriate. This is similar to the Java ME platform's MIDlet.


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.