Lecture07 - Components of Android Application
Lecture07 - Components of Android Application
Lecture07 - Components of Android Application
Windows
Activities
AndroidManifest.xml
Services
Layouts
Broadcast receivers
1. Activity
An activity is a class that presents a visual user interface (screen)
• Examples:
Example
Music player: Keeps playing even though user is navigating to other parts
of the application
Searching Service: that fetch data over the network without blocking user
interaction with an activity.
4. Content Provider
Content providers are objects that can retrieve and store data in
data storage mechanism such as SQLite or datafile
SQLite is an optimized dbms that runs on android .
Content Provider enables applications to share data.
It is the only way to share data across packages.
For Example, any application can access the contacts database
8
4. Content Provider
An android application must have android manifest file, which is
Generated automatically. Its functions include:
1. Describes application components such as activities, intents,
services, Notifications and content etc.
2. Declares the name of java package for the application.
3. Declares the minimum version of android sdk (minsdk) that is
required to run the application.
4. Declares the permissions that application must have in order to
access some APIs or other application.
5. It declares the permission that others are required in order to
access it's own components.
5. Android Manifest File: Example
6. Broadcast Receivers
Broadcast Receiver is a class that receive and react to
broadcast intents.
It is implemented as a subclass of BroadcastReceiver class
and each message is broadcasted as an Intent object.
Context.sendOrderedBroadcast(),
Context.sendStickyBroadcast()
7. Resources
2. Relative layout,
3. Table layout,
4. Grid layout
Thank You
Questions