Thursday, February 21, 2019
Android: International Conference on Computer Essay
Porting nimble web natural covering engine to the humanoid broadcast Yonghong Wu, Jianchao Luo, Lei Luo School of Computer Science and Engineering, University of Electronic Science and technology of China, Chengdu 610054 benbshmily126.com, andyluomail163.com, lluouestc.edu.cn Abstract android which Google released as an open-source un squargon uptled peal operational system is a Linux-based weapons platform it consists of the operating(a) system, middlew atomic number 18, and characterr interface and covering softw ar. xFace is a cross-platform web application engine for winding net. As a global leader in agile web application engine, xFace 1 has the advantages of versatility, clean to master, universal. It signifi hatfultly reduces the effort of victimisation while the function of testing which porting story returns, will greatly reduce the developers reading costs. A complete transplant will greatly reduce the android platform migration workload, hardly in both case to trade name thingamajigs operating efficiency to be make betterd.This paper describes xFace of native code (c + +) lists on the mechanical man ( coffee tree) platform through and through JNI chaffered, xFace porting work(c++) also c whollys the humanoid platform APIs( deep brown) by JNI, much(prenominal) as Graphics, HTTP and close to other related system modules. KeywordsAndroid, JNI, Mobile web Application Engine, Porting are the igneous spot type of value-added renovations, 3G erratic terminals to a lower place a variety of value-added services would be the integration of up to provide mathematical functionrs with chain services, it will be a technical major breakthrough. In addition, along with the WEB2.0 maturity, improving, it makes wide awake Internet to become an inevitable trend in the future, while the development of next-generation mobile communion terminal is the power of mobile Internet development. xFace is a signifier of engine of the web application.It uses HTML, CSS, and burnt umberScript and other weather vane technologies to develop lightweight mobile applications. Mobile applications, which are substantial by using the technology of xFace, washbowl overflow on different operating systems without any modification, such as windows Mobile, BREW, Symbian and other mobile prognosticate platforms. It greatly reduces development efforts and costs of the mobile web application software. Android as an open-source mobile phone platform, is favored by the major mobile phone Manufacturers, its large put of market share is also increasing. In this context, for mobile Internet and mobile terminals, this paper puts forward the way to solve the xFace transplanted to the Android platform that is very(prenominal) valuable and practical signifi finishce.1. IntroductionAlong with the continuous development of communication industry, todays mobile terminals have extended from single service with telephone to multiple ser vices with voice, data, images, video and games 2. Communications, computing and Internet intersection point will be trend of the discipline and communication technology development in the future. Nowadays, operators services have erected one by one in the open data services, a unified service the platform for mobile Internet. The step into data transfer is an important stage in the development of the 3G. It provides rich data services also contributed to the development of smart mobile devices. infra the impact of the 3G, mobile terminals gradually turn to be intelligent. Under a variety of 3G services such as mobile sec messaging, mobile email, mobile search, online browsing, mobile TV and mobile games 978-0-7695-4108-2/10 $26.00 2010 IEEE in spatial relation 10.1109/CIT.2010.369 21572. xFace transplant platforms in the Android platform2.1. Android platform featuresThe architecture of Android system 3, similar to other operating systems, use a hierarchical structure. From the chart to see, Android is divided into four shapes from the top to the impose level are the application mold, application material mold, system horizontal surface and the Linux runtime tenderness layer. In figure 1, Applications with some of the essential applications, such as email, address book, SMS and browser, etc. All applications are done by the java language. Application Framework provides java fellowship library for Android applications, Android application developers essential applications, like developing those core applications, with full leave to access to the APIs provided by good example. Libraries layer was developed by C/C++ language, those libraries are packaged by Application Framework section. The ass section is the Linux Kernel which is developed by c language, it provide the core system services, such as security, memory management, load system management, work at management, network group, Driver Model and so on. It is also an abstract layer between the hardware and system software. persona 1 architecture of AndroidEach of Android applications runs in its own process, to enjoy the Dalvik virtual(prenominal) mold for its exclusive distribution of instances. Dalvik virtual railway car runs a Dalvik-format-Executable file (. Dex), the file of this format is optimized so as to make the Android applications occupy less(prenominal) memory when its running. Java compiler compiles Java source files into class files, class files has been built into the dex format file by a salmagundi of DEX tool, only this file give notice run in Dalvik virtual machine after registered in the Dalvik. Thus, all of the Android applications must use java language to develop. This situation gets C/C++ developers into trouble.xFace engine and porting layer are developed by C/C++, and therefore its a big trouble to port the xFace to Android platform. Feasibility Analysis xFace is developed by C/C++, but the Android application is developed by ja va language, which allows us to have to use JNI 4. JNIs called the Java indwelling Interface, which is provided by coffee bean to allow JAVA and the C/C++ interface to call each other. In view of this, JNI provides feasibility for porting xFace to the Android platform. Native code (interface) of xFace shag be generated the participating library called by JNI in JAVA. Also, because of the Android system functions are supported by JAVA packages (such as SMS, e-mail module, address book, phone calls, local capacity, etc.). Because of all of the Android APIs are based on java package. To finish the operating system-related functions of xFace porting layer, we have to use JNI to call the JAVA classes and methods in C/C++.Transplant Program jibe to the feasibility analysis, we know that xFace is ported to Android platform is on the whole feasible, so it requires an effective plan to implement. An efficient migration plan put forward reduce a lot of workload of transplant. Simultane ously, the operating efficiency of widget is also improved. According to the specificity of Android applications, application framework and start-up code must be written in JAVA language, and then called C/C++ program entry of xFace by JNI in that start-up code. However, in the xFace platform porting layer, some of the features also need to adopt a similar approach to call the Android APIs which are provided as JAVA packages by Android. Event-dispatching grass also be the way through the JNI passing from JAVA to C/C++ layer. And then we formed a transplant plan which is mixed-programming language. As shown in Figure 2.2.2. xFace mobile web application enginexFace is self-possessed of xFace engine and platform registration layer (also known as Porting layer), xFace engine is mainly creditworthy for page layout, script analysis, logic and other functions, the porting layer is mainly responsible for abstracting the operating system-related functions into the system-independent in o rder to make xFace run on different platform.Figure 2 xFace Porting Layer21583. Porting the xFace native economy to Android3.1 Bulit the environmentTransplanting xFace to the Android platform, because of mixture of programming language, we use Eclipse and the Android environment NDK as the environment of compilation. NDK is primarily utilize to compile xFace core and porting layer, and it compiles the starting-entry(C/C++) of xFace into dynamic library. Eclipse is mainly use to build Android application development environment, needed ADT plug-in. At last, we use Eclipse to package the program and the dynamic library, which is generated by NDK, into Android operable files DEX files. Android NDK Android NDK is the acronym for Native Development Kit. Android application developers can use NDK to develop C/C + + native code. In this plan, we also need to use it to develop C/C + + native code and call the java classes and methods by JNI. Android NDK has developed to provide a way o f developing dynamic library for application developer.Developers need to make their range folder into the folder of NDK_ROOT / apps / and write the Makefile in accordance with the judicial admission of NDK. For example, first, we should create a new folder as the name of xFace under the accostory of NDK_ROOT / apps /. Next, we create a new file named application.mk and a new directory named project under the directory which is created just now. Create a new folder named jni in the project folder, our xFace Native Code and Makefiles are placed inside this folde. due(p) to space reasons, we can not do introduce the specifications of the Makefile for the NDK. NDK compiler whole caboodle under the Linux environment, so if you use Windows, you have to show the software such as Cygwin. Installing eclipse After install eclipse software, you should install the ADT plug-in into the eclipse, select the ADT plug-in options and create a new Android emulator.After that you can develop the Android application with it. divided into two parts. One, it is completed entirely by the C/C++ code, such as threads, semaphores, memory 5 and file operations modules. And local capacity of the other part is related to points in two ways, first by the C/C++ to prepare the framework, and it called Android APIs which are provided by JAVA packages (such as access and set the system time, MMI implementation, call the local function such as phone calls, send text messages and other system calls) the second is a direct implementation by the java function, and then C/C++ side call them which have been achieved by the java (such as HTTP module, etc). As shown in Figure 3.Figure 3 Implementation plan of porting layer3.3 consolidation of the porting layer and coreAfter porting layer of each module completed, we can integrate it with xFace engine. Each module of xFace engine also needs to NDK environment to be compiled into static libraries. All of those static libraries are supplied for xF ace program entry module calling. xFace program entry module which is called by JAVA is responsible for the performance of xFace capacity module. This module depends on the xFace engine and platform alteration layer, and must follow the norms of java call native code compiled into dynamic link libraries and by the Eclipse environment, written in java program packaged with the framework to Android emulator to run.4. Details of the designAccording to the above design, we can divide xFace program into three layers application framework grab layer, xFace Native mesmerise, xFace Native layer (shown as below in figure 4). Following segments elaborate the completion of xFace.3.2 Implementation of the porting layerPorting layer is an abstraction of operating system functions-related the implementation of porting layer is the main work of transplant. It provides interfaces for xFace engines, due to different operating systems platform layer functions do add together to abstraction, whic h makes xFace can be run on different platform. Platform adaptation layer implementation can be 21595.TestingAccording to the response of this paper proposing, the function of porting layer has been implemented. After integrating the porting layer and core, it can run web applications. In order to test the validity and long suit of this solution, the following are some simple web application to run screenshot (as shown in figure 5). There are no exceptions and very lulu when the program is running. At this point, it demonstrates the feasibility and correctness of the solution of this paper.Figure 4 Startup process4.1 Application framework entranceApplication framework entrance is primarily responsible for starting the xFace Developed by JAVA language. And its main function is that prepare for running xFace in the Android platform, to provide a running environment, and the creation of the window and dispatch the event information to xFace native layer. As the Android applications are running on Dalvik virtual machine, so the program must start by the way of JAVA. It is a bridge of communication between xFace Native framework and Android, so it is essential.Figure 5 demo application4.2 xFace Native entrancexFace Native entrance is mainly responsible for achieving xFace local businesses, such as loading the page, parsing the page, initialisation xFace widget runtime environment, as well as the release of related resources and so on. Associated with xFace businesslogic is organized in this layer, which is the work of xFace entrance. Only for Application framework entrance called.In the plan, the doing graphics is the maximum cost. It is not direct to strike shape to screen because this plan is using JNI to call JAVA methods to draw graphics. So the program of xFace may be slower than Android Native Application, especially when you running a kind of widget which need a mount of conscription in xFace , such as games.6. Summary currently almost all of the trans plants, the source build-environment of transplant and the target platform build-environment are basically the same. This migration plan of mixed programming language provides a prevalent method for the situation that the source and the target platform of build-environment of transplant are different furthermore, this solution also makes code-reuse to maximize and reduces development costs and cycle. This expression based on the Android platform, while providing a set of transplantation program, but the program is also a place to shortcomings in the drawing mechanism, because it is provided through the JNI calling java class library Android than any other platform, the efficiency of direct system call mapping is reasonably low. Therefore, it is also a need for further study and improvement to improve efficiency.4.3 xFace Native CodeThis layer is mainly to achieve graft-layer specific functions, xFace all of the features are in this layer, which coordinates xFace engine and portin g layer and to make porting layer and the underlying of operating system, porting layer and the Android application programming interface layer in the layer of packaging. It exposes the interfaces to xFace application developers and xFace engines. This layer of xFace is the kernel, all of the performance capabilities of xFace application are implemented in this layer.7. References1 Introduce of xFaceM/OL. http//189works.com/articleDetail.action?u=yangzihao04&id =10124. 2010 2 3G Mobile remnant Development Trend of the operating system M/OL. http//pda.c114.net/32/c4948.hypertext markup language, 2007 3 Android Architecture 2010R/OL. http//www.cnmsdn.com/html/201003/1268713218ID2058_2 .html 4 ChuanBin Tu, Dissecting JDK1.6, Electronic Industry Press, 2008-01 5 Neil Matthew . Professional Linux Programming . Wrox . 2002-01 6 W3C. SVG Tiny 1.2-2008. ascendible vector graphics (SVG) tiny 1.2 specificationS. W3C 2008 7 Niu Xin-Zheng, She Kun, Qin Ke, Zhou Ming-Tian. Cooperative caching optimization outline on Mobile P2P networkJ. Journal of Computer Research and Development. 2008, 42(4) 1-2 8Lei Huang. Development of implant system based on platform. Foreign Electronic Measurement Technology, 2006 9 Wangchao Network. Web Application Development of Mobile devicesDB/OL.http//www.wangchao.net.cn/bbsdetail_314 11.html. 2006-01-08 10 Times Connection. Introduction to Web ApplicationEB/OL.http//cs.now.cn/html/FAQ/VHost/2008 10/10-3088.html. 2008-10-10
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment