SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Application Building Blocks & Components

Android applications are composed of one or more application
components

- Activity
- Services
- Intents
- Content Providers
- Broadcast Receivers




                        Dept. of Computer Science and
                                  Engineering
Activity
• An activity corresponds to a screen. If an application is
  composed of several screens, it has an activity for each
  screen.

• Each activity is a class that extends the base class called
  Activity. It has a graphical user interface made of
  views, and it responds to events. When you change
  screen, a new activity is launched and It can return a
  value

• The graphical interface of an activity is described by a
  Layout              Dept. of Computer Science and
                           Engineering
For example,

An email application might have one activity that shows a list of
new emails, another activity to compose an email, and another
activity for reading emails.




                           Dept. of Computer Science and
                                     Engineering
Application
• Create an application which calls one Activity
  into another




                  Dept. of Computer Science and
                            Engineering
Intent

• Intents are verbs for android devices, which defines actions
  and are made effective by a new screen
    E.g. CALL, SEND_MESSAGE.

• An intent is made up of an action and data that are URI.

• Components of an application — activities, services, and
  broadcast receivers , are activated through messages, called
  intents.

• In each case, the Android system finds the appropriate
  activity, service, or set of broadcast receivers to respond to
                          Dept. of Computer Science and
  the intent, instantiating them if necessary.
                                    Engineering
• Examples of actions: MAIN, VIEW, EDIT, PICK.

  If one wants to see a card about a person, an intent is defined. The
  action is VIEW and the data is the URI which enables access to this
  card.
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <action android:name="android.intent.action.EDIT" />
        <action android:name="android.intent.action.PICK" />
        <category android:name="android.intent.category.DEFAULT" />
        <data
        android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
    </intent-filter>


                            Dept. of Computer Science and
                                      Engineering
IntentFilters

• Describes how the action should apply.
• To inform the system which implicit intents they can handle
  activities, services, and broadcast receivers


IntentReceiver

• It is an object that responds to external events. It can operate in the
  application or it can start an application.
• Example of intent, view a webpage: VIEW for action and for data
  http://www.linkToStuff.org.


                             Dept. of Computer Science and
                                       Engineering
Content Provider

• Data stored by a program, in the form of files or SQLite databases
  are private and may not be used by other applications.

• That is to say, a SQLite database created on Android by one
  application is usable only by that application, not by other
  applications. Databases created in Android are visible only to the
  application that created them

• So, if you need to share data between applications, you need to
  use the content provider.




                           Dept. of Computer Science and
                                     Engineering
For example,

• The Android system provides a content provider that manages the
  user's contact information. As such, any application with the proper
  permissions can query part of the content provider to read and
  write information about a particular person.

• Content providers are also useful for reading and writing data that is
  private to your application and not shared. For example, the Note
  Pad sample application uses a content provider to save notes.




                            Dept. of Computer Science and
                                      Engineering
To query a content provider, you provide a query string in the form of
a URI, with an optional specifier for a particular row, using the
following syntax:

<standard_prefix>://<authority>/<data_path>/<id>


Similarly, to retrieve all the contacts stored by the Contacts
application, the URI would look like this:

content://contacts/people




                            Dept. of Computer Science and
                                      Engineering
Broadcast receivers
• A broadcast receiver is a component that responds to system-
  wide broadcast announcements.
• Many broadcasts originate from the system—for example, a
  broadcast announcing that the screen has turned off, the battery
  is low, or a picture was captured.
• Applications can also initiate broadcasts—for example, to let
  other applications know that some data has been downloaded to
  the device and is available for them to use.
• Although broadcast receivers don't display a user interface, they
  may create a status bar notification to alert the user when a
  broadcast event occurs.


                         Dept. of Computer Science and
                                   Engineering
Services

• A service is a component that runs in the background to
  perform long-running operations . It’s a faceless
  component of a process.

• A service does not provide a user interface.

• A service is designed to operate independently of the
  screen, can update your data source and activities, and
  trigger specific notations.

• The best example is the music player that can work in
  background and when of Computer Science and in some other activity.
                     Dept. we can be
                               Engineering
Layouts



Dept. of Computer Science and
          Engineering
Types of Layout
•   Absolute Layout
•   Frame Layout
•   Linear Layout
•   Relative Layout
•   Table Layout




                      Dept. of Computer Science and
                                Engineering
AbsoluteLayout
• For each view you
  add, you specify the
  exact screen
  coordinate to display
  on the screen




                  Dept. of Computer Science and
                            Engineering
Frame Layout
• designed to display a
  single item at a time.
• element will be
  positioned based on
  the top left of the
  screen




                   Dept. of Computer Science and
                             Engineering
Linear Layout
• organizes elements along a single line.
• Can specify whether that line is vertical or
  horizontal using android:orientation.




                   Dept. of Computer Science and
                              android:orientation
                             Engineering            changed to horizontal.
Relative Layout
• lays out elements
  based on their
  relationships with one
  another, and with the
  parent container.




                  Dept. of Computer Science and
                            Engineering
Table Layout
• Organizes content into
  rows and columns.




                 Dept. of Computer Science and
                           Engineering
Tea Break




Come back at 4:00

   Dept. of Computer Science and
             Engineering

Weitere ähnliche Inhalte

Ă„hnlich wie Session 3 beccse

Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1NAILBITER
 
Embedded Systems.pdf
Embedded Systems.pdfEmbedded Systems.pdf
Embedded Systems.pdfruvabebe
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its FeaturesHarshad Lokhande
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptxasmeerana605
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsiaMichael Angelo Rivera
 
Android architecture
Android architectureAndroid architecture
Android architectureDeepa Rahul
 
architecture of mobile software applications
architecture of mobile software applicationsarchitecture of mobile software applications
architecture of mobile software applicationsHassan Dar
 
Mobile application development
Mobile application developmentMobile application development
Mobile application developmentumesh patil
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentAzfar Siddiqui
 
Unit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptxUnit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptxtaxegap762
 
5 applications bb
5   applications bb5   applications bb
5 applications bbShahid Riaz
 
MoizChhatriwalaPotrfolio
MoizChhatriwalaPotrfolioMoizChhatriwalaPotrfolio
MoizChhatriwalaPotrfolioMoiz Chhatriwala
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android ApplicationNandini Prabhu
 
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai Itvedant
 
Final .pptx
Final .pptxFinal .pptx
Final .pptxMDTAHA059
 

Ă„hnlich wie Session 3 beccse (20)

Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1
 
Embedded Systems.pdf
Embedded Systems.pdfEmbedded Systems.pdf
Embedded Systems.pdf
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptx
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
architecture of mobile software applications
architecture of mobile software applicationsarchitecture of mobile software applications
architecture of mobile software applications
 
Hello androidforyarlmeetup
Hello androidforyarlmeetupHello androidforyarlmeetup
Hello androidforyarlmeetup
 
Basics 4
Basics   4Basics   4
Basics 4
 
Synapseindia android apps overview
Synapseindia android apps overviewSynapseindia android apps overview
Synapseindia android apps overview
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Unit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptxUnit_1(Software and Software Engineering).pptx
Unit_1(Software and Software Engineering).pptx
 
OOSE UNIT-1.pdf
OOSE UNIT-1.pdfOOSE UNIT-1.pdf
OOSE UNIT-1.pdf
 
5 applications bb
5   applications bb5   applications bb
5 applications bb
 
MoizChhatriwalaPotrfolio
MoizChhatriwalaPotrfolioMoizChhatriwalaPotrfolio
MoizChhatriwalaPotrfolio
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
 
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
Everything About Android - Itvedant, Thane | Mumbai | Navi Mumbai
 
Final .pptx
Final .pptxFinal .pptx
Final .pptx
 

KĂĽrzlich hochgeladen

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 

KĂĽrzlich hochgeladen (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 

Session 3 beccse

  • 1. Application Building Blocks & Components Android applications are composed of one or more application components - Activity - Services - Intents - Content Providers - Broadcast Receivers Dept. of Computer Science and Engineering
  • 2. Activity • An activity corresponds to a screen. If an application is composed of several screens, it has an activity for each screen. • Each activity is a class that extends the base class called Activity. It has a graphical user interface made of views, and it responds to events. When you change screen, a new activity is launched and It can return a value • The graphical interface of an activity is described by a Layout Dept. of Computer Science and Engineering
  • 3. For example, An email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Dept. of Computer Science and Engineering
  • 4. Application • Create an application which calls one Activity into another Dept. of Computer Science and Engineering
  • 5. Intent • Intents are verbs for android devices, which defines actions and are made effective by a new screen E.g. CALL, SEND_MESSAGE. • An intent is made up of an action and data that are URI. • Components of an application — activities, services, and broadcast receivers , are activated through messages, called intents. • In each case, the Android system finds the appropriate activity, service, or set of broadcast receivers to respond to Dept. of Computer Science and the intent, instantiating them if necessary. Engineering
  • 6. • Examples of actions: MAIN, VIEW, EDIT, PICK. If one wants to see a card about a person, an intent is defined. The action is VIEW and the data is the URI which enables access to this card. <intent-filter> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.EDIT" /> <action android:name="android.intent.action.PICK" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.dir/vnd.google.note" /> </intent-filter> Dept. of Computer Science and Engineering
  • 7. IntentFilters • Describes how the action should apply. • To inform the system which implicit intents they can handle activities, services, and broadcast receivers IntentReceiver • It is an object that responds to external events. It can operate in the application or it can start an application. • Example of intent, view a webpage: VIEW for action and for data http://www.linkToStuff.org. Dept. of Computer Science and Engineering
  • 8. Content Provider • Data stored by a program, in the form of files or SQLite databases are private and may not be used by other applications. • That is to say, a SQLite database created on Android by one application is usable only by that application, not by other applications. Databases created in Android are visible only to the application that created them • So, if you need to share data between applications, you need to use the content provider. Dept. of Computer Science and Engineering
  • 9. For example, • The Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider to read and write information about a particular person. • Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes. Dept. of Computer Science and Engineering
  • 10. To query a content provider, you provide a query string in the form of a URI, with an optional specifier for a particular row, using the following syntax: <standard_prefix>://<authority>/<data_path>/<id> Similarly, to retrieve all the contacts stored by the Contacts application, the URI would look like this: content://contacts/people Dept. of Computer Science and Engineering
  • 11. Broadcast receivers • A broadcast receiver is a component that responds to system- wide broadcast announcements. • Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. • Applications can also initiate broadcasts—for example, to let other applications know that some data has been downloaded to the device and is available for them to use. • Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. Dept. of Computer Science and Engineering
  • 12. Services • A service is a component that runs in the background to perform long-running operations . It’s a faceless component of a process. • A service does not provide a user interface. • A service is designed to operate independently of the screen, can update your data source and activities, and trigger specific notations. • The best example is the music player that can work in background and when of Computer Science and in some other activity. Dept. we can be Engineering
  • 13. Layouts Dept. of Computer Science and Engineering
  • 14. Types of Layout • Absolute Layout • Frame Layout • Linear Layout • Relative Layout • Table Layout Dept. of Computer Science and Engineering
  • 15. AbsoluteLayout • For each view you add, you specify the exact screen coordinate to display on the screen Dept. of Computer Science and Engineering
  • 16. Frame Layout • designed to display a single item at a time. • element will be positioned based on the top left of the screen Dept. of Computer Science and Engineering
  • 17. Linear Layout • organizes elements along a single line. • Can specify whether that line is vertical or horizontal using android:orientation. Dept. of Computer Science and android:orientation Engineering changed to horizontal.
  • 18. Relative Layout • lays out elements based on their relationships with one another, and with the parent container. Dept. of Computer Science and Engineering
  • 19. Table Layout • Organizes content into rows and columns. Dept. of Computer Science and Engineering
  • 20. Tea Break Come back at 4:00 Dept. of Computer Science and Engineering

Hinweis der Redaktion

  1. Multiple Internet Mail extension