SlideShare a Scribd company logo
1 of 12
Download to read offline
Application
Fundamentals

• Each application runs it’s own
process
• Each process has its own separate
virtual machine
• Each application is assigned a
unique linux user -ID

www.crescosolution.com
Application Fundamentals Types
Activity

Intent

Android
Manifest

Content
Provider

Service

Broadcast
Receiver

www.crescosolution.com
Activity

Basic
component
of most
applications

Most
applications
have more
than one
activities
that all start
each other
as needed

Each activity
implements
as a
subclass of
base Activity
class.

Each activity
is default
window

www.crescosolution.com

The content
of window is
view or
group of
views

Example of
views : text ,
buttons ,
scroll bars
,menu items
etc…

Activity
represents
presentation
layer in
android UI.
Intents

An Intent is exactly what it describes. It's an "intention" to do an action.
An Intent is a messaging object you can use to request an action from another
app component.
An Intent is basically a message to say you did or
want something to happen.
Although intents facilitate
communication between
components in several
ways.

www.crescosolution.com
Types of Intents

Explicit
intents

Implicit
intents

•Specify the component to start by name
because you know the class name of the
activity or service you want to start,For
example, start a new activity in
response to a user action or start a
service to download a file in the
background

•Do not name a specific component but
instead declare a general action to
perform which allows a component from
another app to handle it. For example, if
you want to show the user a location on
a map, you can use an implicit intent to
request that another capable app show
a specified location

www.crescosolution.com
Android Manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1" android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
www.crescosolution.com
Elements of Android Manifest File

<manifest>

•root element of the AndroidManifest.xml file
•It includes the namespace declaration
•It has package attribute that describes the package name of the activity class

<application>

•contains several sub elements
•The commonly used attributes are of this element are icon, label, theme etc.

<activity>
<intent-filter>

<action>
<category>

•Each activity must be defined
•android:label represents a label for the activity, often displayed on the screen
•android:name represents a name for the activity class. It is required attribute

•describes the type of intent to which activity, service or broadcast receiver

•It adds an action for the intent-filter
•intent-filter must have one or more action elements

•It adds an category name to an intent-filter

www.crescosolution.com
Content Providers

Supplies data from one
application to others on
request

Such requests are handled
by the methods of the
ContentResolver class

www.crescosolution.com

A content provider can
use different ways to
store its data and the data
can be stored in a
database, in files, or even
over a network
Service
❏
❏
❏

❏
❏
❏

Does not have visual interface
Runs in background indefinitely
Examples:

Playing
Music

You can bind to a an existing service and
control its operation
Content provider and intents are short lived but
services are always running
Suppose even you exit from app ,the
background process
running.
www.crescosolution.com
Broadcast Receiver
Receive and
react to
broadcast
announcements

Extend the class
BroadcastReceiver

•Low battery, power
connected,
shutdown, time zone
changed, etc.

Examples:

A broadcast receiver is an
Android component which
allows you to register for
system or application events.

www.crescosolution.com
Advance Android application development workshop day 3

More Related Content

Viewers also liked

Software proposal on android
Software proposal on androidSoftware proposal on android
Software proposal on androidKamrul Chowdhury
 
Asynchronous Programming in Android
Asynchronous Programming in AndroidAsynchronous Programming in Android
Asynchronous Programming in AndroidJohn Pendexter
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI ReferenceGauntFace
 
Tips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programmingTips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programmingZalo_app
 
Stream upload and asynchronous job processing in large scale systems
Stream upload and asynchronous job processing  in large scale systemsStream upload and asynchronous job processing  in large scale systems
Stream upload and asynchronous job processing in large scale systemsZalo_app
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application DevelopmentRamesh Prasad
 
Android Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App DevelopersAndroid Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App DevelopersReto Meier
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on AndroidTomáš Kypta
 
Android app development - Java Programming for Android
Android app development - Java Programming for AndroidAndroid app development - Java Programming for Android
Android app development - Java Programming for AndroidOUM SAOKOSAL
 
Reactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaReactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaAli Muzaffar
 
Fundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersFundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersLemi Orhan Ergin
 
Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web developmentbethanygfair
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersLemi Orhan Ergin
 

Viewers also liked (18)

Software proposal on android
Software proposal on androidSoftware proposal on android
Software proposal on android
 
Asynchronous Programming in Android
Asynchronous Programming in AndroidAsynchronous Programming in Android
Asynchronous Programming in Android
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI Reference
 
Tips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programmingTips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programming
 
Stream upload and asynchronous job processing in large scale systems
Stream upload and asynchronous job processing  in large scale systemsStream upload and asynchronous job processing  in large scale systems
Stream upload and asynchronous job processing in large scale systems
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application Development
 
Coding defines reality
Coding defines realityCoding defines reality
Coding defines reality
 
Android Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App DevelopersAndroid Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App Developers
 
Advance Android Layout Walkthrough
Advance Android Layout WalkthroughAdvance Android Layout Walkthrough
Advance Android Layout Walkthrough
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Android app development - Java Programming for Android
Android app development - Java Programming for AndroidAndroid app development - Java Programming for Android
Android app development - Java Programming for Android
 
Reactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaReactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJava
 
Fundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersFundamentals of Web for Non-Developers
Fundamentals of Web for Non-Developers
 
Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web development
 
Sto L Pa N@Nfc Academy 2009
Sto L Pa N@Nfc Academy 2009Sto L Pa N@Nfc Academy 2009
Sto L Pa N@Nfc Academy 2009
 
NFC and Android applications
NFC and Android applicationsNFC and Android applications
NFC and Android applications
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-Developers
 

Similar to Advance Android application development workshop day 3

Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database faiz324545
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & DatabasesMuhammad Sajid
 
Hello android world
Hello android worldHello android world
Hello android worldeleksdev
 
Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3Dr. Ramkumar Lakshminarayanan
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycleKumar
 
Kotlin for Android App Development Presentation
Kotlin for Android App Development PresentationKotlin for Android App Development Presentation
Kotlin for Android App Development PresentationKnoldus Inc.
 
Android app fundamentals
Android app fundamentalsAndroid app fundamentals
Android app fundamentalsAmr Salman
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and EventsHenry Osborne
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptxMugiiiReee
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in androidOum Saokosal
 
Android Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestAndroid Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestDenis Minja
 
Android core components.pptx
Android core components.pptxAndroid core components.pptx
Android core components.pptxAdarshNair65
 

Similar to Advance Android application development workshop day 3 (20)

Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
 
Best android classes in mumbai
Best android classes in mumbaiBest android classes in mumbai
Best android classes in mumbai
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Hello android world
Hello android worldHello android world
Hello android world
 
Android intent
Android intentAndroid intent
Android intent
 
Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3
 
Android Development Basics
Android Development BasicsAndroid Development Basics
Android Development Basics
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
 
Kotlin for Android App Development Presentation
Kotlin for Android App Development PresentationKotlin for Android App Development Presentation
Kotlin for Android App Development Presentation
 
Android app fundamentals
Android app fundamentalsAndroid app fundamentals
Android app fundamentals
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and Events
 
Basics 4
Basics   4Basics   4
Basics 4
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Unit2
Unit2Unit2
Unit2
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in android
 
Android Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestAndroid Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifest
 
ANDROID
ANDROIDANDROID
ANDROID
 
Android core components.pptx
Android core components.pptxAndroid core components.pptx
Android core components.pptx
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 

More from cresco

Advance Android application development workshop day 7
Advance Android application development workshop day 7Advance Android application development workshop day 7
Advance Android application development workshop day 7cresco
 
Advance Android wokshop day7
Advance Android wokshop day7Advance Android wokshop day7
Advance Android wokshop day7cresco
 
Advance Android application development workshop day 7
Advance Android application development workshop day 7Advance Android application development workshop day 7
Advance Android application development workshop day 7cresco
 
Advance Android application development workshop day 6
Advance Android application development workshop day 6Advance Android application development workshop day 6
Advance Android application development workshop day 6cresco
 
Advance Android application development workshop day 2
Advance Android application development workshop day 2Advance Android application development workshop day 2
Advance Android application development workshop day 2cresco
 
Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...
Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...
Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...cresco
 

More from cresco (6)

Advance Android application development workshop day 7
Advance Android application development workshop day 7Advance Android application development workshop day 7
Advance Android application development workshop day 7
 
Advance Android wokshop day7
Advance Android wokshop day7Advance Android wokshop day7
Advance Android wokshop day7
 
Advance Android application development workshop day 7
Advance Android application development workshop day 7Advance Android application development workshop day 7
Advance Android application development workshop day 7
 
Advance Android application development workshop day 6
Advance Android application development workshop day 6Advance Android application development workshop day 6
Advance Android application development workshop day 6
 
Advance Android application development workshop day 2
Advance Android application development workshop day 2Advance Android application development workshop day 2
Advance Android application development workshop day 2
 
Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...
Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...
Students of Navgujarat College of Computer Applications, Ahmedabad felt excit...
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Advance Android application development workshop day 3

  • 1.
  • 2. Application Fundamentals • Each application runs it’s own process • Each process has its own separate virtual machine • Each application is assigned a unique linux user -ID www.crescosolution.com
  • 4. Activity Basic component of most applications Most applications have more than one activities that all start each other as needed Each activity implements as a subclass of base Activity class. Each activity is default window www.crescosolution.com The content of window is view or group of views Example of views : text , buttons , scroll bars ,menu items etc… Activity represents presentation layer in android UI.
  • 5. Intents An Intent is exactly what it describes. It's an "intention" to do an action. An Intent is a messaging object you can use to request an action from another app component. An Intent is basically a message to say you did or want something to happen. Although intents facilitate communication between components in several ways. www.crescosolution.com
  • 6. Types of Intents Explicit intents Implicit intents •Specify the component to start by name because you know the class name of the activity or service you want to start,For example, start a new activity in response to a user action or start a service to download a file in the background •Do not name a specific component but instead declare a general action to perform which allows a component from another app to handle it. For example, if you want to show the user a location on a map, you can use an implicit intent to request that another capable app show a specified location www.crescosolution.com
  • 7. Android Manifest <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.helloworld" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> www.crescosolution.com
  • 8. Elements of Android Manifest File <manifest> •root element of the AndroidManifest.xml file •It includes the namespace declaration •It has package attribute that describes the package name of the activity class <application> •contains several sub elements •The commonly used attributes are of this element are icon, label, theme etc. <activity> <intent-filter> <action> <category> •Each activity must be defined •android:label represents a label for the activity, often displayed on the screen •android:name represents a name for the activity class. It is required attribute •describes the type of intent to which activity, service or broadcast receiver •It adds an action for the intent-filter •intent-filter must have one or more action elements •It adds an category name to an intent-filter www.crescosolution.com
  • 9. Content Providers Supplies data from one application to others on request Such requests are handled by the methods of the ContentResolver class www.crescosolution.com A content provider can use different ways to store its data and the data can be stored in a database, in files, or even over a network
  • 10. Service ❏ ❏ ❏ ❏ ❏ ❏ Does not have visual interface Runs in background indefinitely Examples: Playing Music You can bind to a an existing service and control its operation Content provider and intents are short lived but services are always running Suppose even you exit from app ,the background process running. www.crescosolution.com
  • 11. Broadcast Receiver Receive and react to broadcast announcements Extend the class BroadcastReceiver •Low battery, power connected, shutdown, time zone changed, etc. Examples: A broadcast receiver is an Android component which allows you to register for system or application events. www.crescosolution.com