The Dalvik Virtual Machine
8:29 AM // 0 comments // Sajib Barua // Category: Android Applications //previous Introducing the Open Hands set Alliance
One of the key elements of Android is the Dalvik virtual machine. Rather than use a traditional Java virtual machine (VM) such as Java ME (Java Mobile Edition), Android uses its own custom VM designed to ensure that multiple instances run efficiently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality including security, threading, and process and memory management. It’s also possible to write C/C++ applications that run directly on the underlying Linux OS. While you can do this, in most cases there’s no reason you should need to.
This book focuses exclusively on writing applications that run within Dalvik. If your inclinations run toward exploring the Linux kernel and C/C++ underbelly of Android, modifying Dalvik, or otherwise tinkering with things under the hood, check out the Android Internals Google Group at
http://groups.google.com/group/android-internals
All Android hardware and system service access is managed using Dalvik as a middle tier. By using a VM to host application execution, developers have an abstraction layer that ensures they never have to worry about a particular hardware implementation.
The Dalvik VM executes Dalvik executable fi les, a format optimized to ensure minimal memory footprint. The .dex executables are created by transforming Java language compiled classes using the tools supplied within the SDK.
Android Application Architecture
Android’s architecture encourages the concept of component reuse, allowing you to publish and share activities, services, and data with other applications with access managed by the security restrictions you put in place.
The same mechanism that lets you produce a replacement contact manager or phone dialer can let you expose your application components to let other developers create new UI front ends and functionality extensions, or otherwise build on them.
Android Libraries
Android offers a number of APIs for developing your applications. The following list of core APIs should provide an insight into what’s available; all Android devices will offer support for at least these APIs:
- android.util: The core utility package contains low-level classes like specialized containers, string formatters, and XML parsing utilities.
- android.os: The operating system package provides access to basic operating system services like message passing, interprocess communication, clock functions, and debugging.
- android.graphics: The graphics API supplies the low-level graphics classes that support canvases, colors, and drawing primitives, and lets you draw on canvases.
- android.text: The text processing tools for displaying and parsing text.
- android.database: Supplies the low-level classes required for handling cursors when working with databases.
- android.content: The content API is used to manage data access and publishing by providing services for dealing with resources, content providers, and packages.
- android.view: Views are the core user interface class. All user interface elements are constructed using a series of Views to provide the user interaction components.
- android.widget: Built on the View package, the widget classes are the “here’s one we created earlier” user-interface elements for you to use in your applications. They include lists, buttons, and layouts.
- com.google.android.maps: A high-level API that provides access to native map controls that you can use within your application. Includes the MapView control as well as the Overlay and MapController classes used to annotate and control your embedded maps.
-
android.app: A high-level package that provides access to the application model. The application package includes the Activity and Service APIs that form the basis for all your Android applications.
-
android.provider: To ease developer access to certain standard Content Providers (such as the contacts database), the Provider package offers classes to provide access to standard databases included in all Android distributions.
-
android.telephony: The telephony APIs give you the ability to directly interact with the device’s phone stack, letting you make, receive, and monitor phone calls, phone status, and SMS messages.
-
android.webkit: The WebKit package features APIs for working with Web-based content, including a WebView control for embedding browsers in your activities and a cookie manager.
In addition to the Android APIs, the Android stack includes a set of C/C++ libraries that are exposed through the application framework. These libraries include:
- OpenGL: The library used to support 3D graphics based on the Open GL ES 1.0 API
- FreeType: Support for bitmap and vector font rendering
- SGL: The core library used to provide a 2D graphics engine
- libc: The standard C library optimized for Linux-based embedded devices
- SQLite: The lightweight relation database engine used to store application data
- SSL: Support for using the Secure Sockets Layer cryptographic protocol for secure Internet communications
Advanced Android Libraries
The core libraries provide all the functionality you need to start creating applications for Android, but it won’t be long before you’re ready to delve into the advanced APIs that offer the really exciting functionality.
Android hopes to target a wide range of mobile hardware, so be aware that the suitability and implementation of the following APIs will vary depending on the device upon which they are implemented.
- android.location: The location-based services API gives your applications access to the device’s current physical location. Location-based services provide generic access to location information using whatever position-fixing hardware or technology is available on the device.
- android.media: The media APIs provide support for playback and recording of audio and video media fi les, including streamed media.
- android.opengl: Android offers a powerful 3D rendering engine using the OpenGL ES API that you can use to create dynamic 3D user interfaces for your applications.
- android.hardware: Where available, the hardware API exposes sensor hardware including the camera, accelerometer, and compass sensors.
- android.bluetooth, android.net.wifi , and android.telephony: Android also provides low-level access to the hardware platform, including Bluetooth, Wi-Fi, and telephony hardware.
next Getting Started with Android

Related posts :
0 comments for this post
Leave a reply
Microsoft Word LaTeX Shortcut...
05-Nov-2020Learn Python...
23-Mar-2019A Mathematical Theory of Comm...
10-Dec-2015The Free Energy Secrets of Co...
26-Dec-2014Electronic refrigeration usin...
23-Nov-2014
- Radhika says:
Nice. Thanks for the great information. I have read many blogs but this blog is really informative....[[More detail]] - arohi patil says:
Two Stage Transformer Oil Filtration Plant - Jhun05 says:
Hi, i really needineed help,isais there anyone who can help me about this kV2c FM45s GE electric...[[More detail]] - arif says:
You possess lifted an essential offspring..Blesss for using..I would want to study better latest...[[More detail]] - Dilip says:
Very informative blog. thank you for sharing . keep posting.[[More detail]]