SlideShare a Scribd company logo
Mobile Application Development
(ITEC-303)
Fahim Abid
fahim.abid@uettaxila.edu.pk
fahim.abid@uoc.edu.pk
Credits Hours 3(3,0)
Recommended Books
1. Professional Android application development, Reto Meier, Wrox Programmer to
Programmer, 2015.
2. Android Programming: The Big Nerd Ranch Guides, Phillips, B. & Hardy, B., 2nd
Edition, 2014.
3. iOS Programming: The Big Nerd Ranch Guide, Conway, J., Hillegass, A., & Keur, C.,
5th Edition, 2014.
What Makes an Android Application?
Android applications consist of loosely coupled components, bound using a project
manifest that describes each component and how they interact.
There are six components that provide the building blocks for your applications:
 Activities Your application’s presentation layer. Every screen in your 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. In terms of
desktop development, an Activity is equivalent to a Form.
 Services The invisible workers of your application. Service components run
invisibly, updating your data sources and visible Activities and triggering
Notifications. They’re used to perform regular processing that needs to continue
even when your application’s Activities aren’t active or visible.
 Content Providers A shareable data store. Content Providers are used to manage
and share application databases. Content Providers are the preferred way of
sharing data across application boundaries. This means that you can configure
your own Content Providers to permit access from other applications and use
Content Providers exposed by others to access their stored data.
 Intents A simple message-passing framework. Using Intents, you can broadcast
messages system-wide or to a target Activity or Service, stating your intention to
have an action performed. The system will then determine the target(s) that will
perform any actions as appropriate.
 Broadcast Receivers Intent broadcast consumers. By creating and registering a
Broadcast Receiver, your application can listen for broadcast Intents that match
specific filter criteria. Broadcast Receivers will automatically start your
application to respond to an incoming Intent, making them ideal for event-
driven applications.
 Notifications A user notification framework. Notifications let you signal users
without stealing focus or interrupting their current Activities. They’re the
preferred technique for getting a user’s attention from within a Service or
Broadcast Receiver. For example, when a device receives a text message or an
incoming call, it alerts you by flashing lights, making sounds, displaying icons, or
showing dialog messages. You can trigger these same events from your own
applications using Notifications.
Android Application Manifest
Each Android project includes a manifest file, AndroidManifest.xml, stored in the
root of its project hierarchy. The manifest defines the structure and metadata of
your application, its components and its requirements. It includes nodes for each of
the Activities, Services, Content Providers and Broadcast Receivers that make up
your application and using Intent Filters and Permissions, determines how they
interact with each other and with other applications.
The manifest can also specify application metadata (such as its icon, version
number or theme), and additional top-level nodes can specify any required
permissions, unit tests and define hardware, screen, or platform requirements.
The manifest is made up of a root manifest tag with a package attribute set to the
project’s package. It should also include an xmlns:android attribute that supplies
several system attributes used within the file.
Using the Manifest Editor
To use the Manifest Editor in Android Studio, left click in your project folder.
Android Application Life Cycle
Unlike most traditional environments, Android applications have no control over
their own life cycles. Instead, application components must listen for changes in the
application state and react accordingly, taking particular care to be prepared for
untimely termination.
by default, each Android application is run in its own process that’s running a
separate instance of Dalvik. Memory and process management of each application
is handled exclusively by the run time.
Android aggressively manages its resources, doing whatever it takes to ensure that
the device remains responsive. This means that processes (and their hosted
applications) will be killed, without warning if necessary, to free resources for
higher-priority applications — generally those that are interacting directly with the
user at the time.
Android Application Priority and Process States
The order in which processes are killed to reclaim resources is determined by the
priority of the hosted applications. An application’s priority is equal to its highest-
priority component.
Where two applications have the same priority, the process that has been at a
lower priority longest will be killed first. Process priority is also affected by inter-
process dependencies; if an application has a dependency on a Service or Content
Provider supplied by a second application, the secondary application will have at
least as high a priority as the application it supports.
All Android applications will remain running and in memory until the system needs
its resources for other applications.
shows the priority tree used to determine the order of application termination
Externalizing Resources
Android supports the externalization of resources ranging from simple values such
as strings and colors to more complex resources like images (drawables),
animations, and themes. Perhaps the most powerful resources available for
externalization are layouts.
By externalizing resources, they become easier to maintain, update, and manage.
This also lets you easily define alternative resource values to support different
hardware and internationalization.
Android dynamically selects resources from resource trees that let you define
alternative values based on a device’s hardware configuration, language, and
location. This lets you create different resource values for specific languages,
countries, screens, and keyboards. When an application starts, Android will
automatically select the correct resource values without your having to write a line
of code.
Closer Look at Android Activities
Each Activity represents a screen that an application can present to its users. The
more complicated your application, the more screens you are likely to need.
Typically, this includes at least a primary interface screen that handles the main UI
functionality of your application. This primary interface generally consists of a
number of Fragments that make up your UI and is generally supported by a set of
secondary Activities. To move between screens you start a new Activity.
Most Activities are designed to occupy the entire display, but you can also create
semitransparent or floating Activities.
Creating Activities
Extend Activity to create a new Activity class. Within this new class you must define
the UI and implement your functionality.
The base Activity class presents an empty screen that encapsulates the window
display handling. An empty Activity isn’t particularly useful, so the first thing you’ll
want to do is create the UI with Fragments, layouts, and Views.
Views are the UI controls that display data and provide user interaction. Android
provides several layout classes, called View Groups, which can contain multiple
Views to help you layout your UIs. Fragments are used to encapsulate segments of
your UI, making it simple to create dynamic interfaces that can be rearranged to
optimize your layouts for different screen sizes and orientations.
Installation, Configuration and Understanding Functionality
of Android Studio
Android Studio -2021.1.1.23
Android Project Folders
• java/ ‐ Source files for the module.
• manifests/ ‐ Manifest files for the module.
• res/ ‐ Resource files for the module.
Some important resource types include:
• drawable: Bitmap files (.png, .9.png, .jpg, .gif) or XML files that are compiled into
drawable resource.
• layout: XML files that define a user interface layout.
• menu: XML files that define application menus, such as an Options Menu,
Context Menu, or Sub Menu.
• values: XML files that contain simple values, such as strings, integers, and colors.
Android Project Files
• Java Files: (Source Code)
• Resources:
– XML Files (Layouts, Values, Menus, Colors etc.)
– Images & Other Media Files
• Libraries:
• Assets (Text & Database Files)
Gradle
• Android Studio uses Gradle to compile and build your app.
• There is a build.gradle file for each module of your project, as well as a
build.gradle file for the entire project.
• Usually, you're only interested in the build.gradle file for the module.
• This is where your app's build dependencies are set, including the defaultConfig
settings.
Ad

More Related Content

Similar to Mobile Application Development Lecture 05 & 06.pdf (20)

Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
Dilip Singh
 
Building blocks of android
Building blocks of androidBuilding blocks of android
Building blocks of android
Siddhesh Palkar
 
Notes Unit3.pptx
Notes Unit3.pptxNotes Unit3.pptx
Notes Unit3.pptx
MIT Autonomous Aurangabad
 
Android beginners David
Android beginners DavidAndroid beginners David
Android beginners David
Arun David Johnson R
 
01. Introduction to Android_lecture1.pptx
01. Introduction to Android_lecture1.pptx01. Introduction to Android_lecture1.pptx
01. Introduction to Android_lecture1.pptx
anychowdhury2
 
android app development training report
android app development training reportandroid app development training report
android app development training report
Rishita Jaggi
 
B041130610
B041130610B041130610
B041130610
IOSR-JEN
 
Android ppt
Android pptAndroid ppt
Android ppt
Ansh Singh
 
Mobile testing android
Mobile testing   androidMobile testing   android
Mobile testing android
Basant Dewangan
 
Speed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven developmentSpeed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven development
Bill Duncan
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorial
nirajsimulanis
 
Beginning android
Beginning android Beginning android
Beginning android
Igor R
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Prof. Erwin Globio
 
Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1
Amit Saxena
 
hema ppt (2).pptx
hema ppt (2).pptxhema ppt (2).pptx
hema ppt (2).pptx
balasekaran5
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
PERKYTORIALS
 
Android Basic- CMC
Android Basic- CMCAndroid Basic- CMC
Android Basic- CMC
Pragati Singh
 
Mobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdfMobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdf
AbdullahMunir32
 
Android Development Basics
Android Development BasicsAndroid Development Basics
Android Development Basics
Prajakta Dharmpurikar
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdf
weerabahu
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
Dilip Singh
 
Building blocks of android
Building blocks of androidBuilding blocks of android
Building blocks of android
Siddhesh Palkar
 
01. Introduction to Android_lecture1.pptx
01. Introduction to Android_lecture1.pptx01. Introduction to Android_lecture1.pptx
01. Introduction to Android_lecture1.pptx
anychowdhury2
 
android app development training report
android app development training reportandroid app development training report
android app development training report
Rishita Jaggi
 
B041130610
B041130610B041130610
B041130610
IOSR-JEN
 
Speed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven developmentSpeed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven development
Bill Duncan
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorial
nirajsimulanis
 
Beginning android
Beginning android Beginning android
Beginning android
Igor R
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Prof. Erwin Globio
 
Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1
Amit Saxena
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
PERKYTORIALS
 
Mobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdfMobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdf
AbdullahMunir32
 
Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdf
weerabahu
 

More from AbdullahMunir32 (19)

Mobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdfMobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdf
AbdullahMunir32
 
Mobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdfMobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdf
AbdullahMunir32
 
Mobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdfMobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdf
AbdullahMunir32
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
AbdullahMunir32
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
AbdullahMunir32
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdf
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4
AbdullahMunir32
 
Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2
AbdullahMunir32
 
Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1
AbdullahMunir32
 
Mobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdfMobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdf
AbdullahMunir32
 
Mobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdfMobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdf
AbdullahMunir32
 
Mobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdfMobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdf
AbdullahMunir32
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
AbdullahMunir32
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
AbdullahMunir32
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdf
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4
AbdullahMunir32
 
Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3
AbdullahMunir32
 
Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2
AbdullahMunir32
 
Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1
AbdullahMunir32
 
Ad

Recently uploaded (20)

The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Ad

Mobile Application Development Lecture 05 & 06.pdf

  • 1. Mobile Application Development (ITEC-303) Fahim Abid fahim.abid@uettaxila.edu.pk fahim.abid@uoc.edu.pk
  • 2. Credits Hours 3(3,0) Recommended Books 1. Professional Android application development, Reto Meier, Wrox Programmer to Programmer, 2015. 2. Android Programming: The Big Nerd Ranch Guides, Phillips, B. & Hardy, B., 2nd Edition, 2014. 3. iOS Programming: The Big Nerd Ranch Guide, Conway, J., Hillegass, A., & Keur, C., 5th Edition, 2014.
  • 3. What Makes an Android Application? Android applications consist of loosely coupled components, bound using a project manifest that describes each component and how they interact. There are six components that provide the building blocks for your applications:  Activities Your application’s presentation layer. Every screen in your 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. In terms of desktop development, an Activity is equivalent to a Form.  Services The invisible workers of your application. Service components run invisibly, updating your data sources and visible Activities and triggering Notifications. They’re used to perform regular processing that needs to continue even when your application’s Activities aren’t active or visible.
  • 4.  Content Providers A shareable data store. Content Providers are used to manage and share application databases. Content Providers are the preferred way of sharing data across application boundaries. This means that you can configure your own Content Providers to permit access from other applications and use Content Providers exposed by others to access their stored data.  Intents A simple message-passing framework. Using Intents, you can broadcast messages system-wide or to a target Activity or Service, stating your intention to have an action performed. The system will then determine the target(s) that will perform any actions as appropriate.  Broadcast Receivers Intent broadcast consumers. By creating and registering a Broadcast Receiver, your application can listen for broadcast Intents that match specific filter criteria. Broadcast Receivers will automatically start your application to respond to an incoming Intent, making them ideal for event- driven applications.
  • 5.  Notifications A user notification framework. Notifications let you signal users without stealing focus or interrupting their current Activities. They’re the preferred technique for getting a user’s attention from within a Service or Broadcast Receiver. For example, when a device receives a text message or an incoming call, it alerts you by flashing lights, making sounds, displaying icons, or showing dialog messages. You can trigger these same events from your own applications using Notifications.
  • 6. Android Application Manifest Each Android project includes a manifest file, AndroidManifest.xml, stored in the root of its project hierarchy. The manifest defines the structure and metadata of your application, its components and its requirements. It includes nodes for each of the Activities, Services, Content Providers and Broadcast Receivers that make up your application and using Intent Filters and Permissions, determines how they interact with each other and with other applications. The manifest can also specify application metadata (such as its icon, version number or theme), and additional top-level nodes can specify any required permissions, unit tests and define hardware, screen, or platform requirements. The manifest is made up of a root manifest tag with a package attribute set to the project’s package. It should also include an xmlns:android attribute that supplies several system attributes used within the file.
  • 7. Using the Manifest Editor To use the Manifest Editor in Android Studio, left click in your project folder.
  • 8. Android Application Life Cycle Unlike most traditional environments, Android applications have no control over their own life cycles. Instead, application components must listen for changes in the application state and react accordingly, taking particular care to be prepared for untimely termination. by default, each Android application is run in its own process that’s running a separate instance of Dalvik. Memory and process management of each application is handled exclusively by the run time. Android aggressively manages its resources, doing whatever it takes to ensure that the device remains responsive. This means that processes (and their hosted applications) will be killed, without warning if necessary, to free resources for higher-priority applications — generally those that are interacting directly with the user at the time.
  • 9. Android Application Priority and Process States The order in which processes are killed to reclaim resources is determined by the priority of the hosted applications. An application’s priority is equal to its highest- priority component. Where two applications have the same priority, the process that has been at a lower priority longest will be killed first. Process priority is also affected by inter- process dependencies; if an application has a dependency on a Service or Content Provider supplied by a second application, the secondary application will have at least as high a priority as the application it supports. All Android applications will remain running and in memory until the system needs its resources for other applications.
  • 10. shows the priority tree used to determine the order of application termination
  • 11. Externalizing Resources Android supports the externalization of resources ranging from simple values such as strings and colors to more complex resources like images (drawables), animations, and themes. Perhaps the most powerful resources available for externalization are layouts. By externalizing resources, they become easier to maintain, update, and manage. This also lets you easily define alternative resource values to support different hardware and internationalization. Android dynamically selects resources from resource trees that let you define alternative values based on a device’s hardware configuration, language, and location. This lets you create different resource values for specific languages, countries, screens, and keyboards. When an application starts, Android will automatically select the correct resource values without your having to write a line of code.
  • 12. Closer Look at Android Activities Each Activity represents a screen that an application can present to its users. The more complicated your application, the more screens you are likely to need. Typically, this includes at least a primary interface screen that handles the main UI functionality of your application. This primary interface generally consists of a number of Fragments that make up your UI and is generally supported by a set of secondary Activities. To move between screens you start a new Activity. Most Activities are designed to occupy the entire display, but you can also create semitransparent or floating Activities.
  • 13. Creating Activities Extend Activity to create a new Activity class. Within this new class you must define the UI and implement your functionality. The base Activity class presents an empty screen that encapsulates the window display handling. An empty Activity isn’t particularly useful, so the first thing you’ll want to do is create the UI with Fragments, layouts, and Views. Views are the UI controls that display data and provide user interaction. Android provides several layout classes, called View Groups, which can contain multiple Views to help you layout your UIs. Fragments are used to encapsulate segments of your UI, making it simple to create dynamic interfaces that can be rearranged to optimize your layouts for different screen sizes and orientations.
  • 14. Installation, Configuration and Understanding Functionality of Android Studio Android Studio -2021.1.1.23 Android Project Folders • java/ ‐ Source files for the module. • manifests/ ‐ Manifest files for the module. • res/ ‐ Resource files for the module.
  • 15. Some important resource types include: • drawable: Bitmap files (.png, .9.png, .jpg, .gif) or XML files that are compiled into drawable resource. • layout: XML files that define a user interface layout. • menu: XML files that define application menus, such as an Options Menu, Context Menu, or Sub Menu. • values: XML files that contain simple values, such as strings, integers, and colors.
  • 16. Android Project Files • Java Files: (Source Code) • Resources: – XML Files (Layouts, Values, Menus, Colors etc.) – Images & Other Media Files • Libraries: • Assets (Text & Database Files)
  • 17. Gradle • Android Studio uses Gradle to compile and build your app. • There is a build.gradle file for each module of your project, as well as a build.gradle file for the entire project. • Usually, you're only interested in the build.gradle file for the module. • This is where your app's build dependencies are set, including the defaultConfig settings.
  翻译: