Friday, May 17, 2019

Android: International Conference on Computer Essay

Porting restless web cover engine to the mechanical man political political platform Yonghong Wu, Jianchao Luo, Lei Luo prep ar of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 610054 benbshmily126.com, andyluomail163.com, lluouestc.edu.cn Abstract humanoid which Google released as an open-source wandering(a) phone run system is a Linux- base platform it consists of the operating system, middleware, and implementr larboard and drill software. xFace is a cross-platform web application engine for liquid Internet. As a global leader in rambling web application engine, xFace 1 has the advantages of versatility, easy to master, universal. It signifi mountaintly reduces the effort of forgement while the go of testing which porting class tins, will greatly reduce the germinateers development costs. A perfect trans final causet will greatly reduce the mechanical man platform migration workload, but also to make widget s operating competency to be improved.This paper describes xFace of native mark (c + +) runs on the humanoid (java) platform through JNI screamed, xFace porting level(c++) also c each(prenominal)s the android platform APIs( java) by JNI, such(prenominal) as Graphics, HTTP and different related system staffs. KeywordsAndroid, JNI, Mobile web applications programme Engine, Porting are the hot spot type of value-added services, 3G mobile terminals chthonian a variety of value-added services would be the integration of up to provide users with chain services, it will be a technical major breakthrough. In addition, along with the WEB2.0 maturity, improving, it makes mobile Internet to become an inevitable trend in the future, while the development of next-generation mobile confabulation terminal is the power of mobile Internet development. xFace is a kind of engine of the web application.It uses HTML, CSS, and JavaScript and other electronic network technologies to develop lig htweight mobile applications. Mobile applications, which are developed by using the applied science of xFace, can run on different operating systems without whatever modification, such as windows Mobile, BREW, Symbian and other mobile phone 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 rate of securities industry share is also increasing. In this context, for mobile Internet and mobile terminals, this paper puts forward the look to bring in the xFace trans final causeted to the Android platform that is very valuable and practical significance.1. IntroductionAlong with the continuous development of communication industry, todays mobile terminals have extended from single service with telephone to multiple services with voice, entropy, images, video and games 2. Communications, computing and Internet convergence will be trend of the information and communication applied science 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 leg in the development of the 3G. It provides rich data services also contributed to the development of smart mobile devices. low the impact of the 3G, mobile terminals gradually turn to be intelligent. Under a variety of 3G services such as mobile instant messaging, mobile email, mobile search, online browsing, mobile TV and mobile games 978-0-7695-4108-2/10 $26.00 2010 IEEE at heart 10.1109/CIT.2010.369 21572. xFace transplant programs in the Android platform2.1. Android platform featuresThe architecture of Android system 3, quasi(prenominal) to other operating systems, use a hierarchical structure. From the chart to see, Android is divided into four horizontal surfaces from the fall to the lower level are the application point, application modelling floor, system layer and the Linux runtime core layer. In fancy 1, Applications with some of the essential applications, such as email, address book, SMS and browser, etc. All applications are through with(p) by the Java language. Application Framework provides java class library for Android applications, Android application developers developed applications, like developing those core applications, with full permission to access to the APIs provided by framework. Libraries layer was developed by C/C++ language, those libraries are packaged by Application Framework section. The rear section is the Linux Kernel which is developed by c language, it provide the core system services, such as security, repositing management, burden system management, process management, network group, Driver Model and so on. It is also an short-change layer between the hardware and system software.Figure 1 Architecture of AndroidEach of Android application s runs in its own process, to enjoy the Dalvik virtual mould for its exclusive distribution of instances. Dalvik virtual machine runs a Dalvik-format-Executable file (. Dex), the file of this format is optimized so as to make the Android applications occupy less 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 kind of DEX tool, only this file can 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 java language, which allows us to have to use JNI 4. JNIs called the Java Native Interface, which is provided by JAVA to allow JAVA and the C/C++ inte rface to call each other. In view of this, JNI provides feasibility for porting xFace to the Android platform. Native code (interface) of xFace can be generated the dynamic 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 base 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 According to the feasibility analysis, we know that xFace is ported to Android platform is entirely feasible, so it requires an effective plan to implement. An efficient migration plan can reduce a lot of workload of transplant. Simultaneously, the operating efficiency of widget is also improved. According to the specialisedity of Android applications, application framework and start-up code must be written in JAV A language, and then called C/C++ program intro of xFace by JNI in that start-up code. However, in the xFace platform porting layer, some of the features also invite to adopt a similar approach to call the Android APIs which are provided as JAVA packages by Android. Event-dispatching can also be the demeanor 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 composed of xFace engine and platform adaptation layer (also known as Porting layer), xFace engine is mainly responsible 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 order to make xFace run on different platform.Figure 2 xFace Porting Layer21583. Porting the xFace native Code 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 utilise to compile xFace core and porting layer, and it compiles the kickoff-entry(C/C++) of xFace into dynamic library. Eclipse is mainly used 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 executable files DEX files. Android NDK Android NDK is the acronym for Native discipline 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 of developing dynamic library for application developer.Developers need to make their project folder into the folder of NDK_ROOT / apps / and hold open the Makefile in accordance wit h the specification of NDK. For example, first, we should create a new folder as the name of xFace under the directory 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. nominate a new folder named jni in the project folder, our xFace Native Code and Makefiles are placed inside this folde. Due to space reasons, we can not do introduce the specifications of the Makefile for the NDK. NDK compiler works under the Linux environment, so if you use Windows, you have to frame 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 t he 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 effectuation, 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 Integration 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 xFace 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 platfor m adaptation 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 ternion layers application framework entrance layer, xFace Native entrance, 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 transplantation. It provides interfaces for xFace engines, due to different operating systems platform layer functions do retard to abstraction, which makes xFace can be run on different platform. Platform adaptation layer implementation can be 21595.TestingAccording to the solution of this paper proposing, the function of porting layer has be en implemented. After integrating the porting layer and core, it can run web applications. In order to test the validity and effectiveness of this solution, the following are some simple web application to run screenshot (as shown in figure 5). There are no exceptions and very steady when the program is running. At this point, it picturenstrates the feasibility and correctness of the solution of this paper.Figure 4 inauguration 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.Figu re 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, initialization xFace widget runtime environment, as well as the release of related resources and so on. Associated with xFace businesslogic is organize in this layer, which is the work of xFace entrance. Only for Application framework entrance called.In the plan, the allureing graphics is the level best cost. It is not direct to draw 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 drawing in xFace , such as games.6. succinctCurrently almost all of the transplants, 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 genera l 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 article 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 slightly 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 porting 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 interfac es 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 Terminal Development Trend of the operating system M/OL. http//pda.c114.net/32/c4948.html, 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 . master Linux Programming . Wrox . 2002-01 6 W3C. SVG Tiny 1.2-2008. Scalable vector graphics (SVG) tiny 1.2 specificationS. W3C 2008 7 Niu Xin-Zheng, She Kun, Qin Ke, Zhou Ming-Tian. Cooperative caching optimization dodging on Mobile P2P networkJ. Journal of Computer Research and Development. 2008, 42(4) 1-2 8Lei Huang. Development of embedded system based on platform. Foreign Electronic Measurement Technology, 2006 9 Wan gchao 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

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.