Android basics
- 2. What is Android?
Android is a mobile operating system.
It is based on linux.
And hence it is open source.
Google Acquired Android Inc., A Small Startup, in
2005.
And now…..
Android is Moving Beyond Phones and Tablets to
Other Areas(IoT), Like Wearable Technology.
Who
am i?
- 3. Android is based on linux-
Hardware abstraction – drivers
Memory management
Process Management
Security Model
Networking
And many more …...
What does it mean?
Android sits on Linux. It simply means that the core of Android
is nothing but the Linux kernel.
It provides following functionality to Android-
- 5. Android Application Basics-
Android applications are written in Java programming
language.
Though one can write android application in any other language as
well using cross compilers.
SDK tools compile the source codes along with any
data and resource files into an archive file with an .apk
suffix. This is called an Android package and all the
code in single .apk file is treated as one application.
- 6. Each application lives in its own
security sandbox-
Sounds good .. but what actually this means ?
When an Android package is installed on Android
powered device, each application lives in its own
security sandbox which means the Android OS allows
any application/process to be able to access only the
information and resources that are necessary for its
legitimate purpose. This is known as principle of least
privilege.
So what is this principle and how android achieves
it?
- 7. How android achieves the
concept of sandbox?
Here comes the power of a multi-user OS : Linux
The Android operating system is a multi-user Linux
based system in which each application is a different
user.
Each application is assigned a unique Linux user ID
which will be used only by the system and is unknown
to the application.
The system sets permissions forall the files in an
application so that only the user ID assigned to that
application can access them.
- 8. Continue...
Each process has its own virtual machine (VM), so an
application's code runs in isolation from other
applications.
By default, every application runs in its own Linux
process. Android starts the process when any of the
application's components need to be executed.
And it shuts down the process when it is no longer
needed or when the system must recover memory for
other applications.
- 9. Multi-user Android devices
Just think and you will get the answer …...
we know every single app is an user.
But now android supports multiple user account on the same device
as in desktop os.
HOW?
- 12. Activity
An Activity represents a single screen with a user
interface.
Every screen in the application will be an extension
of the Activity class.
Activities use Views to form graphical user interfaces
that display information and respond to user actions.
- 13. Service
Services perform long-running operations or work for
remote processes in the background and do not
provide a user interface.
Other component, such as an activity, can start a
service and it will continue to run in the background
even if the user switches to another application.
- 14. Content Provider
Content provider manages a shared set of application
data and provides a generic way to share information
between the applications.
For example, contact information is shared through a
content provider to any application.
A content provider is often accessed from another
process by means of IPC.
- 15. Broadcast Receiver
A Broadcast Receiver is a component that responds
to system-wide broadcast announcements such as
incoming call, SMS received, screen has turned off,
the battery is low, or a picture was captured.
Applications can also initiate broadcasts, for
example, to inform other applications that some data
has been downloaded to the device and is available
for them to use.