Introduction toAndroid Programming=Architecture, Basic building blocks, API , Application Structure
shamli5
48 views
13 slides
Apr 23, 2024
Slide 1 of 13
1
2
3
4
5
6
7
8
9
10
11
12
13
About This Presentation
Introduction to Android Programming- Architecture, Basic building blocks, API , Application Structure
Size: 1.11 MB
Language: en
Added: Apr 23, 2024
Slides: 13 pages
Slide Content
1
Introduction to Android Programming
•What is Android?
•History and Versions
•Android Architecture
•Basic Building Blocks
•Android API Levels
•Application Structure
•First Hello World Program
2
Introduction to Android Programming
Android Architecture
3
Introduction to Android Programming
Basic Building Blocks
Activities : An activity is usually
a single screen that the user sees on
the device at one time.
Starting state
Running state
Paused state
Stopped state
Destroyed state
4
Introduction to Android Programming
Intents :
Intents are messages that are sent among the major building blocks. They
trigger an activity to start up, tell a service to start or stop, or are simply
broadcasts.
5
Introduction to Android Programming
Services
Services run in the background and don’t have any user interface components.
Service life cycle
6
Introduction to Android Programming
Content Providers
Content providers are interfaces for sharing data between applications.
7
Introduction to Android Programming
Broadcast Receivers
•Broadcast receivers are Android’s implementation.
•The receiver is simply dormant code that gets activated once an
event to which it is subscribed happens.
•You can also send your own broadcasts from one part of your
application to another, or to a totally different application.
•Broadcast receivers themselves do not have any visual
representation, nor are they actively running in memory.
•But when triggered, they get to execute some code, such as
starting an activity, a service, or something else.
8
Introduction to Android Programming
Application Context
•Activities, services, content providers, and broadcast receivers.
•Together, they make up an application.
•Application context refers to the application environment and the process
within which all its components are running. It allows applications to share
the data and resources between various building blocks.
•You can easily obtain a reference to the context by calling
Context.getApplicationContext() or Activity.getApplication().
9
Introduction to Android Programming
Android API Levels
https://www.mulesoft.com/resources/api/what-is-an-api
What is an API? (Application Programming Interface)
•API is the acronym for Application Programming Interface, which is a
software intermediary that allows two applications to talk to each other.
•Each time you use an app like Facebook, send an instant message, or check
the weather on your phone, you’re using an API.
10
Introduction to Android Programming
Android APIs are known by an API level, for example, API level 23.
An API level represents a specific Android release.
If you open Android SDK Manager in Visual Studio, you will see the
following screen:
11
Introduction to Android Programming
12
Introduction to Android Programming
Application Structure
•The android project contains different types
of app modules, source code files, and
resource files. We will explore all the folders
and files in the android app.