Android Libraries
Just above the kernel are the Android libraries. In programming, libraries are
reusable program components that make program development and computer
operations easier. A few of the known libraries in Android are surface manager,
media framework, SQLite, OpenGL, ES, FreeType, WebKit, SGL, SSL, and
libc.
These libraries make things easier for programmers by preventing them from
reinventing the wheel or recreating a component. For example, the WebKit is a
library that contains procedures, classes, subroutines, and pre-written code to
give a program the capability to browse the web.
In case that your program will have minor browsing capabilities or it will show
ad banners from the web, you can just use the functions from the WebKit library.
You do not need to develop your own web browser in your program, which is an
inefficient task by itself.
On the other hand, the SSL library helps programs when it comes to establishing
secure internet connections, while SQLite provides database capabilities to
programs. You will learn the use of the other Android libraries as you advance in
your path as an Android app developer.
Android Runtime
Just beside the Android libraries in the second layer in the Android platform is
the Android runtime. It has two of the primary components that allow most
applications on your smartphone or Android device to work. First are the core
libraries. Second is the Dalvik Virtual Machine.
The two of them allows your Android devices to run programs written using
Java. Primarily, the Dalvik Virtual Machine acts as a compiler for your Java
applications. The Dalvik Virtual Machine reads and translates your Java
programs to machine code, which allows your phone to execute them easily.
Aside from allowing Java programs to run in your phone, it also supports and
performs multi threading and memory management. It means that it can allow
your Java or Android programs to run simultaneously.
As an FYI, Java programs always require a virtual machine in order to run. Its
primary function is to allow Java programs to run in any operating system.
Normally, programs written in other languages need to be written precisely for
the operating system it will run on.
Java programs, on the other hand, are needed to be programmed for the virtual
machine. Instead of the programs being tailored for the operating systems, the
virtual machines tailor itself to the operating system, which does a lot of favor to
Java developers.
The Dalvik Virtual Machine was developed primarily for Android. Aside from
allowing Java programs to run on mobile devices, it also makes them run
optimally — in a sense that it will use less system resources and memory storage
space. On the other hand, the core libraries are there to aid the Java programs to
run.
Do'stlaringiz bilan baham: |