.

Wednesday, December 19, 2018

'Android: International Conference on Computer Essay\r'

'Porting alert vane cover rail counsel locomotive to the android course of study Yonghong Wu, Jianchao Luo, Lei Luo rail of calculating machine Science and Engineering, University of Electronic Science and rail mode locomotive room of China, Chengdu 610054 benbshmily@126.com, andyluomail@163.com, lluo@uestc.edu.cn Abstract humanoid which Google released as an open- fountain unstable ph adept direct remains is a Linux-establish political computer program; it consists of the direct carcass, middlewargon, and ingestionr port wine and practise softwargon. xFace is a cross-platform web practise engine for erratic mesh. As a global leader in spry web covering engine, xFace [1] has the advantages of versatility, easy to master, universal. It signifi screwingtly reduces the endeavour of maturement; while the go of testing which porting work delivers, provide greatly reduce the stand uper’s coachment costs. A perfect trans castt impart greatly reduce the humanoid platform migration workload, but alike to make widget’s string might to be improved.\r\nThis constitution describes xFace of internal reckon (c + +) runs on the humanoid ( coffee tree) platform through JNI shrieked, xFace porting work(c++) overly bellows the android platform APIs(coffee) by JNI, much(prenominal) as Graphics, HTTP and other(a)(a) related system facultys. Keywords†mechanical man, JNI, brisk web lotion Engine, Porting are the hot spot type of value-added intention, 3G runny terminals down the stairs a variety of value-added services would be the integration of up to provide users with chain services, it will be a technical major(ip) breakthrough. In addition, along with the WEB2.0 maturity, improving, it makes fluid profit to become an unavoidable trend in the future, while the development of next-generation officious communication terminal is the power of nomadic Internet development. xFace is a kind of engine of the web application.\r\nIt uses HTML, CSS, and JavaScript and other web technologies to develop lightweight mobile applications. Mobile applications, which are unquestionable by using the applied science of xFace, give the gate run on incompatible operating systems without every modification, such(prenominal)(prenominal) as windows Mobile, BREW, Symbian and other mobile phone platforms. It greatly reduces development efforts and costs of the mobile web application software. mechanical man as an open-source mobile phone platform, is favored by the major mobile phone Manufacturers, its large rate of grocery store share is also increasing. In this context, for mobile Internet and mobile terminals, this paper puts forward the modal value to work on the xFace transfered to the humanoid platform that is very valuable and matter-of-fact significance.\r\n1. inception\r\nAlong with the continuous development of communication industry, today’s mobile terminals generate elonga ted from single service with telephone to multiple services with voice, data, images, video and games [2]. Communications, computing and Internet convergence will be trend of the information and communication engine room 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 format in the development of the 3G. It provides rich data services also contributed to the development of smart mobile devices. on a lower floor the impact of the 3G, mobile terminals gradu bothy 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 in placement(a) 10.1109/CIT.2010.369 2157\r\n2. xFace trans inventt programs in the mechanical man platform\r\n2.1. humanoid platform features\r\nThe architecture of Android system [3], alike to other operating systems, use a hierarchical structure. From the chart to see, Android is divided into four tiers; from the binding to the lower level are the application shape, application material level, system degree and the Linux runtime core seam. In construe 1, employments with some of the essential applications, such as email, address book, SMS and browser, etc. All applications are do by the Java language. Application Framework provides java class library for Android applications, Android application developers provenstrable applications, like developing those core applications, with in full permission to access to the APIs provided by simulation. Libraries shape was developed by C/C++ language, those libraries are packaged by Application Framework section. The merchantman section is the Linux Kernel which is developed by c language, it provide the core system services, such as security, retentivity management, b lame system management, process management, interlock group, Driver Model and so on. It is also an outline layer between the hardware and system software.\r\n meet 1 Architecture of Android\r\nEach of Android applications runs in its own process, to enjoy the Dalvik virtual railroad car for its exclusive distribution of instances. Dalvik virtual shape runs a Dalvik-format-Executable load (. Dex), the file of this format is optimized so as to make the Android applications occupy less memory when it’s 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.\r\nxFace engine and porting layer are developed by C/C++, and therefore it’s a big trouble to port the xFace to Android pla tform. 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]. JNI’s called the Java ind substantiallying Interface, which is provided by deep brown to allow coffee tree and the C/C++ interface to call each other. In view of this, JNI provides feasibleness for porting xFace to the Android platform. internal 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, topical anaesthetic anaesthetic 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++.\r\nTransplant Program: consort to the feasibleness 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 particular(prenominal)ity of Android applications, application framework and start-up code must be create verbally in JAVA language, and then called C/C++ program entrée of xFace by JNI in that start-up code. However, in the xFace platform porting layer, some of the features also command to adopt a similar approach to call the Android APIs which are provided as JAVA packages by Android. Event- takeing can 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.\r\n2.2. xFace mobile web application engine\r\nxFace is composed of xFace engine and platform adaptation layer (also known as Porting layer), xFace engine is mainly responsible for page layout, script analysis, system of logic and other functions, the porting layer is mainly responsible for abstracting the operating system-related functions into the system-independent in regularise to make xFace run on contrastive platform.\r\nFigure 2 xFace Porting Layer\r\n2158\r\n 3. Porting the xFace native Code to Android\r\n3.1 Bulit the environment\r\nTransplanting xFace to the Android platform, because of mixture of programming language, we use master and the Android environment NDK as the environment of compilation. NDK is primarily use to compile xFace core and porting layer, and it compiles the out solidification-entry(C/C++) of xFace into dynamic library. brood is mainly used to build Android application development environment, destinyed 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 essential phylogenesis Kit. Android application developers can use NDK to develop C/C + + native code. In this plan, we also take in 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.\r\nDevelopers need to make their figure folder into the folder of â€Å"NDK_ROOT / apps /” and spell the Makefile in accordance with 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. make out 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 tack together 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.\r\nAfter that you can develop the Android application with it. divided into two parts. One, it is absolute 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 slaying, 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.\r\nFigure 3 Implementation plan of porting layer\r\n3.3 Integration of the porting layer and core\r\nAfter 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 electrostatic libraries. All of those static libraries are supplied for xFace program entry module traffic. 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 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.\r\n4. Details of the design\r\nAccording to the above design, we can divide xFace program into lead layers: application framework entrance layer, xFace Native entrance, xFace Native layer (shown as below in figure 4). Followin g segments elaborate the completion of xFace.\r\n3.2 Implementation of the porting layer\r\nPorting 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 tick off to abstraction, which makes xFace can be run on different platform. Platform adaptation layer implementation can be 2159\r\n 5.\r\nTesting\r\nAccording to the solution 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 effectiveness of this solution, the following are some simple web application to run screenlandshot (as shown in figure 5). There are no exceptions and very steady when the program is running. At this point, it demonstrates the feasibility and correctness of the solution of this paper.\r\nF igure 4 startup process\r\n4.1 Application framework entrance\r\nApplication 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.\r\nFigure 5 demo application\r\n4.2 xFace Native entrance\r\nxFace 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 nonionic in this layer, which is the work of xFace entrance. Only for Applicati on framework entrance called.\r\nIn the plan, the blowing graphics is the maximal 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 long-playing than Android Native Application, especially when you running a kind of widget which need a put one over of drawing in xFace , such as games.\r\n6. synopsis\r\nCurrently 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 popular 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 ground on the Android platform, while providing a set of transplantation program, but the program is also a place to shortcomings in the dr awing 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.\r\n4.3 xFace Native Code\r\nThis 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 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.\r\n 7. References\r\n[1] Introduce of xFace[M/OL]. http://189works.com/articleDetail.action?u=yangzihao04&id =10124. 2010 [2] 3G Mobile terminus Development Trend of the operatin g system [M/OL]. http://pda.c114.net/32/c4948.html, 2007 [3] Android Architecture 2010[R/OL]. http://www.cnmsdn.com/html/201003/1268713218ID2058_2 .html [4] ChuanBin Tu, Dissecting JDK1.6, Electronic pains Press, 2008-01 [5] Neil Matthew . Professional Linux Programming . Wrox . 2002-01 [6] W3C. SVG Tiny 1.2-2008. Scalable transmitter graphics (SVG) tiny 1.2 specification[S]. W3C 2008 [7] Niu Xin-Zheng, She Kun, Qin Ke, Zhou Ming-Tian. Cooperative caching optimization strategy on Mobile P2P network[J]. Journal of Computer Research and Development. 2008, 42(4): 1-2 [8]Lei Huang. Development of embedded system based on platform. Foreign Electronic Measurement Technology, 2006 [9] Wangchao Network. Web Application Development of Mobile devices[DB/OL].http://www.wangchao.net.cn/bbsdetail_314 11.html. 2006-01-08 [10] Times Connection. Introduction to Web Application[EB/OL].http://cs.now.cn/html/FAQ/VHost/2008 10/10-3088.html. 2008-10-10\r\n'

No comments:

Post a Comment