Android is an open source operating system used for mobile devices like smartphones and tablets. It is developed by Google and managed by the Open Handset Alliance. The Android manifest file contains important configuration settings for Android applications, including supported SDK versions, required permissions, application components and more. It determines how the application interacts with the operating system.
1. Android is a software package and linux based
operating system for mobile devices such as tablet
computers and smartphones.
It is developed by Google and later the OHA (Open
Handset Alliance).
Java language is mainly used to write the android code
The goal of android project is to create a successful
real-world product that improves the mobile
experience for end users.
2. It's a consortium of 84 companies such as google,
samsung, AKM, synaptics, KDDI, Garmin,Teleca,
Ebay, Intel etc.
It was established on 5th November, 2007, led by
Google.
It is committed to advance open standards,
provide services and deploy handsets using the
Android Platform.
3.
4. Beautiful UI Android OS basic screen provides a beautiful and intuitive user interface.
Connectivity
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth,Wi-Fi, LTE, NFC and
WiMAX.
Storage
SQLite, a lightweight relational database, is used for data storage
purposes.
Media support
H.263, H.264, MPEG-4 SP,AMR, AMR-WB,AAC, HE-AAC, AAC 5.1, MP3,
MIDI, OggVorbis,WAV, JPEG, PNG, GIF, and BMP
Messaging SMS and MMS
Web browser
Based on the open-sourceWebKit layout engine, coupled with Chrome's
V8 JavaScript engine supporting HTML5 and CSS3.
Multi-touch
Android has native support for multi-touch which was initially made
available in handsets such as the HTC Hero.
Multi-tasking
User can jump from one task to another and same time various
application can run simultaneously.
Widgets are resizable, so users can expand them to show more content or
5. Multi-Language Supports single direction and bi-directional text.
GCM
Google Cloud Messaging (GCM) is a service that lets developers send
short message data to their users on Android devices, without needing a
proprietary sync solution.
Wi-Fi Direct
A technology that lets apps discover and pair directly, over a high-
bandwidth peer-to-peer connection.
Android Beam
A popular NFC-based technology that lets users instantly share, just by
touching two NFC-enabled phones together.
6.
7. CODE Name Version API Level
Marshmallow 6.0 API level 23
Lollipop 5.1 API level 22
Lollipop 5.0 API level 21
KitKat 4.4 - 4.4.4 API level 19
Jelly Bean 4.3.x API level 18
Jelly Bean 4.2.x API level 17
Jelly Bean 4.1.x API level 16
Ice Cream Sandwich 4.0.3 - 4.0.4 API level 15, NDK 8
Ice Cream Sandwich 4.0.1 - 4.0.2 API level 14, NDK 7
Honeycomb 3.2.x API level 13
Honeycomb 3.1 API level 12, NDK 6
Honeycomb 3.0 API level 11
Gingerbread 2.3.3 - 2.3.7 API level 10
8. Gingerbread 2.3 - 2.3.2 API level 9, NDK 5
Froyo 2.2.x API level 8, NDK 4
Eclair 2.1 API level 7, NDK 3
Eclair 2.0.1 API level 6
Eclair 2.0 API level 5
Donut 1.6 API level 4, NDK 2
Cupcake 1.5 API level 3, NDK 1
(no code name) 1.1 API level 2
(no code name) 1.0 API level 1
9.
10. Linux kernel
It is the heart of android architecture that exists at the
root of android architecture.
Linux kernel is responsible for device drivers, power
management, memory management, device
management and resource access.
11. Native Libraries
On the top of linux kernel, their are Native libraries such
as WebKit, OpenGL, FreeType, SQLite, Media, C runtime
library (libc) etc.
TheWebKit library is responsible for browser support,
SQLite is for database, FreeType for font support, Media
for playing and recording audio and video formats.
12. Android Runtime
In android runtime, there are core libraries and DVM
(DalvikVirtual Machine) which is responsible to run
android application.
DVM is like JVM but it is optimized for mobile devices. It
consumes less memory and provides fast performance.
13. Android Framework
On the top of Native libraries and android runtime, there
is android framework.
Android framework includes Android API's such as UI
(User Interface), telephony, resources, locations,
Content Providers (data) and package managers.
It provides a lot of classes and interfaces for android
application development.
14. Applications
On the top of android framework, there are
applications.
All applications such as home, contact, settings, games,
browsers are using android framework that uses android
runtime and libraries.
15.
16. Activity
An activity is a class that represents a single screen. It is like a
Frame in AWT.
View
A view is the UI element such as button, label, text field etc.
Anything that you see is a view.
Intent
Intent is used to invoke components.
Start the service, Launch an activity, Display a web page,
Display a list of contacts, Broadcast a message, Dial a phone
call etc.
17. Service
Service is a background process that can run for a long
time.
Content Provider
Content Providers are used to share data between the
applications.
Fragment
Fragments are like parts of an activity. An activity can
display one or more fragments on the screen at the
same time.
18. The AndroidManifest.xml file contains information of
your package, including components of the application
such as activities, services, broadcast receivers,
content providers etc.
It performs some other tasks also:
It is responsible to protect the application to access any
protected parts by providing the permissions.
It also declares the android api that the application is going
to use.
It lists the instrumentation classes.The instrumentation
classes provides profiling and other informations.These
informations are removed just before the application is
published etc.
19. <manifest>
manifest is the root element of the
AndroidManifest.xml file. It has package attribute that
describes the package name of the activity class.
<application>
application is the subelement of the manifest. It
includes the namespace declaration.
This element contains several subelements that declares
the application component such as activity
20. The commonly used attributes are of this element
are icon, label, theme etc.
android:icon represents the icon for all the android
application components.
android:label works as the default label for all the
application components.
android:theme represents a common theme for all
the android activities.
21. <activity>
activity is the subelement of application and represents
an activity that must be defined in the
AndroidManifest.xml file.
It has many attributes such as label, name, theme,
launchMode etc.
<intent-filter>
intent-filter is the sub-element of activity that describes
the type of intent to which activity, service or broadcast
receiver can respond to.
22. The Android Activity class is core to any Android
Application.
You define and implement an Activity class for each screen
in your application.
23. Simple game application can have following five
Activities.
Startup or Splash screen.
A Main menu screen.
A Game play screen.
A High Scores screen.
A Help/About screen.
24.
25. Android applications can be multi-process.
Android OS allows multiple applications to run
concurrently, provide memory and processing power is
available.
Application can have background processes, and
application can be interrupted and paused when event such
as phone call occurs.
26. There can be only one active activity visible to the user at a
time.
Android OS keeps track of all activity objects running by
placing them on Activity stacks.
When a new Activity starts, the Activity on the top of the
stack pauses, and the new Activity pushes on to the top of
the stack.
When that Activity finishes that Activity is removed from
the activity stack, and the previous Activity in the stack
resumes.
27.
28. onCreate()
This is the first callback and called when the activity is
first created.
onStart()
This callback is called when the activity becomes visible
to the user.
onResume()
This is called when the user starts interacting with the
application.
onPause()
The paused activity does not receive user input and
cannot execute any code and called when the current
activity is being paused and the previous activity is
being resumed.
onStop()
This callback is called when the activity is no longer
visible.
29. An Intent (android.content.Intent) is An asynchronous
message mechanism used by android operating system.’
To match task requests with the appropriate activity or
Service (launching it, if necessary)
To dispatch broadcast Intents events to the system at large.
30. Some Activity instances —such as the application splash/
startup screen —are shown and then permanently discarded
when the Main menu screen Activity takes over.
The user can not return to the splash screen Activity
without re-launching the application.
Android applications can have multiple entry points.
31. There is no main() function, such as you find in iPhone
development.
Instead, a specific Activity can be designated as the main
Activity to launch by default within the
AndroidManifest.xml file.
32. Activity can be started in many ways.
Use the Application Context object to call the
startActivity() method, which takes a single parameter, an
Intent.
Intent intent = new Intent(getApplicationContext(),
Second.class);
startActivity(intent);
33. Intents need not specify the component or class they want
to launch explicitly.
An Intent is basically saying “do this” (the action) to “that”
(the Uri describing what resource to do the action to).
34. Example of how to create a simple Intent with a predefined
Action (ACTION_DIAL) to launch the Phone Dialer with a
specific phone number to dial in the form of a simple Uri
object:
Uri number = Uri.parse(tel:5555551212);
Intent dial = new Intent(Intent.ACTION_DIAL, number);
startActivity(dial);
35. You can also include additional data in an Intent.
The Extras property of an Intent is stored in a Bundle
object.
The Intent class also has a number of helper methods
for getting and setting name/value pairs for many
common data types.
For example —
Intent intent= new Intent(this, MyActivity.class);
36. Intent object can be broadcasted to Android system. (using
method broadcast Intent()).
Any application interested can receive that broadcast
(called a BroadcastReceiver).
These types of Intent objects are generally used to inform
the greater system that something interesting has happened
and use special Intent action types.
37. The Intent action ACTION_BATTERY_LOW broadcasts a
warning when the battery is low.
There are also broadcast Intent objects for other interesting
system events, such as
SD card state changes,
Applications being installed or removed
The wallpaper being changed.
38. An Android Service is basically an Activity without a
user interface.
It can run as Background services.
Intents and Activities can be used to launch using:
startService().
Must be registered in the Android Manifest file.
Generally, Services are used when no input is required
from the user.
39. Application can start service and service can run in
background even if application is switched with new
application by user
A service is most useful when the operations are
lengthy or need to be done regularly.
40.
41. Bound
Bound service is a kind of service which runs till the
lifespan of the activity which started this service
In short you can say that life cycle of service is tied
with life cycle of activity which started it.
Unbound
Unbound service is kind of service which runs in the
background indefinitely, even if the activity which
started this service ends.
42. A Weather forecasting application.
Email service providing service.
Chatting application.
Social network app might implement a service to
routinely check for updates.
A synchronized data from web to local db.
43. Android projects use a special configuration file called
the Android manifest file to determine application
settings.
The Android application manifest file is a specially
formatted XML file that must accompany each Android
application.
The Android manifest file is named
AndroidManifest.xml and must be included at the top
level of any Android project.
44. The Android manifest file categorized into following
category :
▪ The Manifest tab
▪ The Application tab
▪ The Permissions tab
▪ The Instrumentation tab
▪ The AndroidManifest.xml tab
45. The Manifest tab :
The Manifest tab (see Figure 5.1) contains package-wide
settings, including the package name, version
information, and supported Android SDK information.
You can also set any hardware or feature requirements
here.
46. TheApplication tab :
The Application tab contains application-wide settings.
It includes the application label and icon, as well as
information about the application components such as
activities, intent filters, and other application
components.
It also includes configuration for services, intent filters,
and content providers.
47. The Permission tab :
The Permissions tab (see Figure 5.3) contains any
permission rules required by your application.
This tab can also be used to enforce custom permissions
created for the application.
48. The Instrumentation tab :
The Instrumentation tab allows the developer to declare
any instrumentation classes formonitoring the
application.
49. TheAndroidManifest.xml tab :
The Android manifest file is a specially formatted XML
file.You can edit the XML manually by clicking on the
AndroidManifest.xml tab.
Android manifest files generally include a single
<manifest> tag with a single<application> tag.
50.
51. Some of the application system requirements that
developers can configure through the Android manifest
file include
The Android SDK versions supported by the
application
The Android platform features used by the application
The Android hardware configurations required by the
application
The screen sizes and pixel densities supported by the
application
52. The minSdkVersion attribute:
▪ This attribute specifies the lowest API level that the
application supports.
▪ <uses-sdk android:minSdkVersion="4" />
The targetSdkVersion attribute:
▪ This attribute specifies the optimum API level that the
application supports.
▪ <uses-sdk android:targetSdkVersion="8" />
The maxSdkVersion attribute:
▪ This attribute specifies the highest API level that the
application supports.
▪ <uses-sdk android:maxSdkVersion="10" />
53. Android devices have different hardware and software
configurations.
Some devices have built-in keyboards and others rely
upon the software keyboard.
Similarly, certain Android devices support the latest 3-D
graphics libraries and others provide little or no graphics
support.
The Android manifest file has several informational tags
for flagging the system features and hardware
configurations supported or required by an Android
application.
54. An Activity class can be designated as the primary entry
point by configuring an intent filter using the Android
manifest tag <intent-filter> in the application’s
AndroidManifest.xml file with the MAIN action type and
the LAUNCHER category.