Blogger Tips and TricksLatest Tips For BloggersBlogger Tricks

Thursday 20 February 2014

OPTIMIZED DALVIK VIRTUAL MACHINE FOR MOBILE APPLICATION


OPTIMIZED DALVIK VIRTUAL MACHINE FOR MOBILE APPLICATION
(Open source technology)
B.OBULIRAJ
B.E CSE

ABSTRACT:
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Android is a software platform and operating system for mobile devices based on the Linux operating system and developed by Google and the Open Handset Alliance. It allows developers to write managed code in a Java-like language that utilizes Google-developed Java libraries, but does not support programs developed in native code. The unveiling of the Android platform on 5 November 2007 was announced with the founding of the Open Handset Alliance, a consortium of 34 hardware, software and telecom companies devoted to advancing open standards for mobile devices. When released in 2008, most of the Android platform will be made available under the Apache free-software and open-source license.
 INTRODUCTION:
In July 2005, Google acquired Android Inc., a small startup company based in Palo Alto, CA. Android's co-founders who went to work at Google included Andy Rubin (co-founder of Danger), Rich Miner (co-founder of Wildfire Communications, Inc), Nick Sears (once VP at T-Mobile), and Chris White (one of the first engineers at WebTV). At the time, little was known about the functions of Android Inc. other than they made software for mobile phones.At Google, the team, led by Rubin, developed a Linux-based mobile device OS which they marketed to handset makers and carriers on the premise of providing a flexible, upgradeable system. It was reported that Google had already lined up a series of hardware component and software partners and signaled to carriers that it was open to various degrees of cooperation on their part.
As the experienced team started to work hardly in Google Campus, it was a first serious sign about Google entering mobile phone market. In 2007, the Open Handset Alliance (OHA) was created to develop open standards for mobile devices. It consisted of 34 grand members, such as Google itself, NVIDIA, Intel, Motorola, T- Mobile and other mobile operators, handset manufacturers, software and other companies. As OHA stands for open mobile platform, a great race has started between OHA and main competitors Apple, Microsoft, Symbian and others. Microsoft launched Windows Mobile 6.0 version with full updated Office Mobile and other features. Symbian with over 110 million smartphones released OSv.9.5, and Apple stroked market with iPhone. The entire world was waiting for the response from Google with visionary Gphone, a single mobile device which could compete with iPhone and other mobile phones. OHA came with better solution – Google Android – first truly open mobile phone platform based on Linux, with clear and simple user interface and applications, created in Java. This strategy, which is about to declare not a single Gphone, but to put Android into existing and new mobiles devices and to make thousands of Gphones, gives mobile operators and device manufacturers significant freedom and flexibility to design products. As Google Android will be truly released in 2008 with its source code, at this moment Google announced Android SDK together with competition, which provides 10 million dollars in awards for Android developers. This idea seems to be quit clear and logical, in order to speed up and boost Java developers, but actually the contest slowed down the knowledge integration. The contest has effectively caused developers not to share their code to others. Therefore, I found a lack of answering to questions and other support on Android groups over the internet. Nevertheless, I believe there will be plenty of code available to help inexperienced developers make ideas come to life.
ABOUT ANDROID:
Android is a mobile operating system initially developed by Android Inc. Android was bought by Google in 2005.Android is based upon a modified version of the Linux kernel. Google and other members of the Open Handset Alliance collaborated on Android's development and release. The Android Open Source Project (AOSP) is tasked with the maintenance and further development of Android. Unit sales for Android OS smartphones ranked first among all Smartphone OS handsets sold in the U.S. in the second and third quarters of 2010, with a third quarter market share of 43.6%.
The unveiling of the Android distribution on 5 November 2007 was announced with the founding of the Open Handset Alliance, a consortium of 79 hardware, software, and telecom companies devoted to advancing open standards for mobile devices. Google released most of the Android code under the Apache License, a free software and open source license.
The Android operating system software stack consists of Java applications running on a Java based object oriented application framework on top of Java core libraries3 running on a Dalvik virtual machine featuring JIT compilation. Libraries written in C include the surface manager, OpenCore media framework, SQLite relational database management system, OpenGL ES 2.0 3D graphics API, WebKit layout engine, SGL graphics engine, SSL, and Bionic libc. The Android operating system consists of 12 million lines of code including 3 million lines of XML, 2.8 million lines of C, 2.1 million lines of Java, and 1.75 million lines of C++.
ACTIVITY:
                   Description: life-cycle-frombootcamp
       Fig no: 1- Activity diagram for android



DALVIK RUNTIME:
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language. Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool. The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.







COMPONENTS OF ANDROID:
The following diagram shows the major components of the Android operating system.   
Fig no: 2- Components of Android


COMMON STRUCTUER OF                    ANDROID:

                                          Description: android-hello-image                    
      Fig no: 3-Common structure of android
Views such as lists, grids, text boxes, buttons, and even an embeddable web browser
Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data
An Activity Manager that manages the life cycle of applications and provides a common navigation backstack
A Notification Manager that enables all apps to display custom alerts in the status bar
A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files
Broadcast receivers can trigger intents that start an application
Data storage provide data for your apps, and can be shared between apps – database, file, and shared preferences (hash map) used by group of applications
Activity is the presentation layer of your app: there will be one per screen, and the Views provide the UI to the activity
Intents specify what specific action should be performed
Services run in the background and have no UI for the user – they will update data, and trigger events



STANDARD COMPONENTS:

                          
     Fig. no 4- Standard components
ADVANTAGES OF ANDROID:
There are many different cell phone platforms to choose from today. Smart phones have become phones that many people have versus just professionals like it was just a few years ago. One platform that you can look into is Google's Android phone. This has become a fairly popular phone in the last year which offers some advantages.

First of all, it's an open platform. This means that the project is open source meaning that its code is available for people to look at. Generally speaking open source projects are fairly innovative and will give you quality features since anyone can program them into the system.
An Android phone is guaranteed to work with Google products. There are many different Google products that most people use. Whether it's YouTube, Gmail, Google Docs or others, these will work on this phone giving you access to a wide variety of applications that you can use between your phone and your computer.
Eventually this platform will work on netbook and computers. This means that you could have devices that share the same platform giving you the ability to purchase applications that will work on all your devices.
FEATURES OF ANDROID:
Application Framework:
It is used to write applications for Android. Unlike other embedded mobile environments, Android applications are all equal, for instance, an applications which come with the phone are no different than those that any developer writes. The framework is supported by numerous open source libraries such as openssl, SQLite and libc. It is also supported by the Android core libraries. From the point of security, the framework is based on UNIX file system permissions that assure applications have only those abilities that mobile phone owner gave them at install time.
Dalvik Virtual Machine:
It is extremely low-memory based virtual machine, which was designed especially for Android to run on embedded systems and work well in low power situations. It is also tuned to the CPU attributes. The Dalvik VM creates a special file format (.DEX) that is created through build time post processing. Conversion between Java classes and .DEX format is done by included “dx” tool.
Integrated Browser:
Google made a right choice on choosing WebKit as open source web browser. They added a two pass layout and frame flattening. Two pass layout loads a page without waiting for blocking elements, such as external CSS or external JavaScript and after a while renders again with all resources downloaded to the device. Frame flattening converts founded frames into single one and loads into the browser. These features increase speed and usability browsing the internet via mobile phone.
Optimized Graphics:
As Android has 2D graphics library and 3D graphics based on OpenGL ES 1.0, possibly we will see great applications like Google Earth and spectacular games like Second Life, which come on Linux version. At this moment, the shooting legendary 3D game Doom was presented using Android on the mobile phone.
SQLite:
Extremely small (< 500kb) relational database management system, is integrated in Android. It is based on function calls and single file, where all definitions, tables and data are stored. This simple design is more than suitable for a platform such as Android.
Handset Layouts:
The platform is adaptable to both larger, VGA, 2D graphics library, 3D graphics library based on OpenGL ES 1.0 specifications, traditional smart phone layouts. An underlying 2D graphics engine is also included. Surface Manager manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications
Data Storage:
SQLite is used for structured data storage .SQLite is a powerful and lightweight relational database engine available to all applications.
Connectivity:
Android supports a wide variety of connectivity technologies including GSM,
CDMA, Bluetooth, EDGE, EVDO, 3G and Wi-Fi.
Messaging:
SMS, MMS, and XMPP are available forms of messaging including threaded text messaging.
 Web Browser:
The web browser available in Android is based on the open-source WebKit application framework. It includes LibWebCore which is a modern web browser engine which powers both the Android browser and an embeddable web view.
Java Virtual Machine:
Software written in Java can be compiled into Dalvik byte codes and executed in the Dalvik virtual machine, which is a specialized VM implementation designed for mobile device use, although not technically a standard Java Virtual Machine
CONCLUSION:
          On the Android platform they are an indispensable way to enable data sharing between applications. If your application becomes the first big hit on Android, the data generated could be easily shared. There are a lot of exciting possibilities being generated from the Android platform, so to best take full advantage of these possibilities now and in future

REFERENCE:
Ø  www. developer.android.com
Ø  www.anddev.org
Ø  www. stuffthathappens.com
Ø  www. en.androidwiki.com
Ø  www.android.com
Ø  www. en.androidwiki.com


No comments:

Post a Comment