In this post were going to demonstrate some of the features of the Android platform so that any developer from any background can have a look on what Android really is .
- Java code is interpreted not compiled (see this link to know the difference) and it need the Java Virtual Machine JVM to do so. Android provides its own virtual machine called the Dalvik Virtual machine
- The dalvik VM takes the generated java class files and combine them in to Dalvik executable (.dex) files that saves storage space (uncompressed) by half compared to similar JAR file.
- Google did not use a Just In Time (JIT) debugger because of the fact that many of androids core libraries and APIs are written in C and C++ such as the graphics API.
- The final executable code of Android is not java byte code it is .dex files.
This picture describes the Android software stack that can be described briefly as a Linux Kernel and C/C++ libraries exposed through an application framework that provides services for and management of runtime and applications.
The elements of the Android software stack are:
- Linux Kernel: version 2.6, provides abstraction between the hardware and the rest of the stack, responsible for device drivers (Camera , Wi Fi, etc ), resources management , power management, security and net working
- C/C++ Libraries: such as SQL lite, Graphics libraries such as OpenGL, media library for Audio and Vide playback
- The Android Runtime: includes Core libraries and the Dalvik VM.
The Core libraries provide most of java libraries + additional Android libraries.
The Dalvik VM is optimized to run multiple instances of VMs. As Java applications access the core libraries each application has its own VM - The Android Application Framework: Provides classes required to develop an Android application and abstraction between hardware access. the Android Java APIs main library include telephony, content providers (data), resources, locations and UI.
- Application Layer: all Android applications(native or third party) are built on the application layer using the same API.
Android architecture encourages component reuse allowing you to publish and share activities, services and data between applications with security restrictions defined by you. This enables developers to present new UI for out of the box components such as the phone dialer or contact manager, or adding new functionalities to them.
The basis of the Android applications are:
- Activity Manager: which controls the life cycle of the activities, activities can be compared to the windows or web forms they carry the controls (views) that construct the interface, an activity represents a single screen.
- Views: the UI components that construct the interface. They can be compared to the swing or windows forms controls
- Notification Manger: provides a consistent mechanism to notify or alert users.
- Content Providers: lets applications to share data between them.
- Resources Manager: much like the ASP.NET resources concept. Enables the developer to store resources such as strings or images
0 comments:
Post a Comment