SlideShare a Scribd company logo
Mobile application
development
Android introduction
Alberto Rubalcaba
Oracle Certified Professional, Java SE Programmer
¿What is Android?
 Open source, open platform for mobile development
 All the SDK, API and platform source is available
 No need for licence or app review
 You can replace any system app with your own
 Official development site: developer.android.com
How it works?
Components architecture model
Every component provides his interface
Java programming
Useful programming tips
Avoid creating objects
Use native functions
Prefer static
Avoid internal getter o setter
Declare constants final
Avoid floats and enums
Android Architecture
Project architecture
Design principles
Delight me in surprising
Real objects are more fun than buttons and menus
Let me make it mine
Get to know me
Keep it brief
Pictures are faster than words
Decide for me, but let me have the final say
http://developer.android.com/design/get-started/principles.html
App components
Activities
Services
Content providers
Broadcast receivers
Activity life cycle
Services
Perform long operations on background
Runs trough applications
A component can bind to a service to interact with and perform
interprocess communication (IPC)
Service states
Started
Bound
http://developer.android.com/guide/components/services.html
Content providers
Manages access to structured set of data
Provide mechanisms for defining data security
Connects data in one process with code running in another process
http://developer.android.com/guide/topics/providers/content-
providers.html
Broadcast receivers
Send broadcasts across applications
Registered by the context of the application dynamically
Registered statically in the android manifest
http://developer.android.com/reference/android/content/BroadcastRe
ceiver.html
Intents
Abstract description of an operation to be performed
Can be used to start activities, send broadcasts, start or bind services
Intent structure
Action. The general action to be performed
Data. The data to operate on, such a record on contacts, as a URI
Category. Gives additional information about the action to execute
Type. Specifies an explicit type (MIME types) of the intent data
Extras. This is a Bundle of additional information
http://developer.android.com/reference/android/content/Intent.html
Application Context
Interface to global information about an application environment
Abstract class whose implementation is provided by Android system
Allows access to application-specific resources and classes
Calls for application-level operations such as launching activities,
broadcasting and receiving intents
http://developer.android.com/reference/android/content/Context.htm
l
Bundle
Mapping to String values to various Parcelable types (Serializable)
Has methods to put <key,value>’s to the map
Has methods to get <key,value>’s from the map
Has a method to clear() the whole map
http://developer.android.com/reference/android/os/Bundle.html
Manifest
All applications must have a manifest in the root directory
Presents essential information the system must have before running
the app
It names the java package for the application
It describes the components of the application
It determines which processes will host application components
Declares permissions to access protected parts of the API
http://developer.android.com/guide/topics/manifest/manifest-
intro.html
User interface
Built using View and ViewGroup objects
A View is an object that draws something on the screen to interact
with
A ViewGroup is an object that holds other View’s and ViewGroup’s
objects in order to define the layout of the app
http://developer.android.com/guide/topics/ui/index.html
User interface layout
User interface layout
The effective way to define your layout is via XML
The name of the XML element is respective to the Android class it
represents
http://developer.android.com/guide/topics/ui/declaring-layout.html
Example
Layouts
Defines the visual structure for a user interface
After declaring a layout in XML, it should be saved in the res/layout
project directory
When you compile your app, each layout is compiled into a View
resource
The layout should be loaded in the Activity.onCreate(Bundle b)
method
Call setContentView(R.layout.my_view)
Common Layouts
Linear layout
Relative layout
Web view
List view
Grid view
Input controls
Interactive components in your UI
Just add the control to the xml
http://developer.android.com/guide/topics/ui/controls.html
Common controls
Event listeners
Event listener example
Menus
Common UI component
Appears when the user touch the menu soft/hard button
Types of menus
Options menu and action bar
Context menu and contextual action menu
Pop up menu
http://developer.android.com/guide/topics/ui/menus.html
Defining a menu in XML
Defined in res/menu
Inflate the menu in the onCreate(Bundle b) method
Easier to visualize the menu structure in XML
Separates the content of the menu from the behavioral code
Allows to create alternative menu configurations
Allows to create submenus
Menu example
Handling menu events
Dialogs
AlertDialog
DatePickerDialog
TimePickerDialog
CustomDialogs
http://developer.android.com/guide/topics/ui/dialogs.html
Dialogs (1)
Dialogs content
Title
Optional, should be used only when the content area is occupied by a detailed message,
list or custom layout
Content area
This can display a message, a list or a custom layout
Action buttons
There should be no more than 3 action buttons in a dialog
Dialogs (2)
The alertDialog.Builder class provides API’s that allow you to create
an AlertDialog with the kinds of contents, including custom layouts
Dialogs (3)
To add action buttons call the setPositiveButton() and
setNegativeButton() methods
Dialogs (4)
Traditional single-choice list
Persistent single-choice list (radio buttons)
Persistent multiple-choice list (check boxes)
Toasts
Provides a simple feedback about an operation in a small popup
Fills the amount of space required for the message
http://developer.android.com/guide/topics/ui/notifiers/toasts.html
Toasts (1)
Instantiate a Toast object with one of the makeToast() methods
This method takes three parameters
Application context
String message
Toast duration (millis)
Custom Toasts
 You can create customized layout for your toast notification
 Define a view XML layout
 Pass the root view object to the setView(View) method
Custom Toasts
You must use the ID of your custom layout to inflate it from the XML
Sensors
Sensors (1)
Sensor framwork
SensorManager
Sensor
SensorEvent
SensorEventListener
http://developer.android.com/guide/topics/sensors/index.html
Sensors (2)
Identifying sensors
Get the sensor service
Get the sensor that you are looking for
Sensors (3)
• Monitoring events
Let’s code 

More Related Content

PPTX
Unit2
DevaKumari Vijay
 
PPTX
Android application-component
Ly Haza
 
PPTX
Android components
NAVEENA ESWARAN
 
PPTX
Android apps development
Raman Pandey
 
PPT
Android studio 2.0: default project structure
Vyara Georgieva
 
PDF
04 user interfaces
C.o. Nieto
 
PPT
Android In A Nutshell
Ted Chien
 
PDF
Android UI Fundamentals part 1
Marcos Paulo Souza Damasceno
 
Android application-component
Ly Haza
 
Android components
NAVEENA ESWARAN
 
Android apps development
Raman Pandey
 
Android studio 2.0: default project structure
Vyara Georgieva
 
04 user interfaces
C.o. Nieto
 
Android In A Nutshell
Ted Chien
 
Android UI Fundamentals part 1
Marcos Paulo Souza Damasceno
 

What's hot (20)

PPTX
03 android application structure
Sokngim Sa
 
ODP
Ppt 2 android_basics
Headerlabs Infotech Pvt. Ltd.
 
PPTX
01 introduction to android
Sokngim Sa
 
PPT
View groups containers
Mani Selvaraj
 
DOCX
Android resources in android-chapter9
Dr. Ramkumar Lakshminarayanan
 
PPTX
Beginning android
Igor R
 
PDF
Android session 3
Ahesanali Suthar
 
PPTX
Lesson 10
CITSimon
 
PDF
Android session 2
Ahesanali Suthar
 
PPTX
Android programming basics
Egerton University
 
PDF
Android session 1
Ahesanali Suthar
 
PDF
01 08 - graphical user interface - layouts
Siva Kumar reddy Vasipally
 
PDF
01 11 - graphical user interface - fonts-web-tab
Siva Kumar reddy Vasipally
 
PPTX
Android app fundamentals
Amr Salman
 
PPTX
Android Programming.pptx
vishal choudhary
 
PPT
Day 4: Android: UI Widgets
Ahsanul Karim
 
PPT
Android development orientation for starters v4 seminar
Joemarie Amparo
 
PPTX
Android development orientation for starters v2
Joemarie Amparo
 
PPTX
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Eng Teong Cheah
 
PDF
Android tutorial
Alberto Jr Gaudicos
 
03 android application structure
Sokngim Sa
 
Ppt 2 android_basics
Headerlabs Infotech Pvt. Ltd.
 
01 introduction to android
Sokngim Sa
 
View groups containers
Mani Selvaraj
 
Android resources in android-chapter9
Dr. Ramkumar Lakshminarayanan
 
Beginning android
Igor R
 
Android session 3
Ahesanali Suthar
 
Lesson 10
CITSimon
 
Android session 2
Ahesanali Suthar
 
Android programming basics
Egerton University
 
Android session 1
Ahesanali Suthar
 
01 08 - graphical user interface - layouts
Siva Kumar reddy Vasipally
 
01 11 - graphical user interface - fonts-web-tab
Siva Kumar reddy Vasipally
 
Android app fundamentals
Amr Salman
 
Android Programming.pptx
vishal choudhary
 
Day 4: Android: UI Widgets
Ahsanul Karim
 
Android development orientation for starters v4 seminar
Joemarie Amparo
 
Android development orientation for starters v2
Joemarie Amparo
 
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Eng Teong Cheah
 
Android tutorial
Alberto Jr Gaudicos
 
Ad

Viewers also liked (6)

PPT
Google Android
Michael Angelo Rivera
 
PPTX
Android ppt
Pooja Garg
 
ZIP
Android Application Development
Benny Skogberg
 
KEY
Android Development: The Basics
Mike Desjardins
 
PPT
Android ppt
Ansh Singh
 
PPT
Android ppt
blogger at indiandswad
 
Google Android
Michael Angelo Rivera
 
Android ppt
Pooja Garg
 
Android Application Development
Benny Skogberg
 
Android Development: The Basics
Mike Desjardins
 
Android ppt
Ansh Singh
 
Ad

Similar to Android App Development (Basics) (20)

PPT
Industrial Training in Android Application
Arcadian Learning
 
PPT
Android Tutorial
Fun2Do Labs
 
ODP
Intro To Android App Development
Mike Kvintus
 
PPT
Android
Jesus_Aguirre
 
PPT
Android tutorial
katayoon_bz
 
PPT
Android tutorial
Ed Zel
 
PPT
Android tutorial
Techacademy Software
 
PPT
Android tutorial
Keshav Chauhan
 
PPT
Android-Tutorial.ppt
siddharthsingh496426
 
PPT
Android tutorial
Avinash Nandakumar
 
PDF
Introduction to Android Development
Aly Abdelkareem
 
DOCX
Android Tutorial For Beginners Part-1
Amit Saxena
 
PPTX
Android Development project
Minhaj Kazi
 
PPT
Android For Java Developers
Mike Wolfson
 
ODP
Nativa Android Applications development
Alfredo Morresi
 
PPTX
Introduction to android
Shrijan Tiwari
 
PPT
Android best training-in-mumbai
vibrantuser
 
DOCX
What is Android?
ndalban
 
PPTX
Android Development Basics
Prajakta Dharmpurikar
 
PPTX
architecture of android.pptx
allurestore
 
Industrial Training in Android Application
Arcadian Learning
 
Android Tutorial
Fun2Do Labs
 
Intro To Android App Development
Mike Kvintus
 
Android
Jesus_Aguirre
 
Android tutorial
katayoon_bz
 
Android tutorial
Ed Zel
 
Android tutorial
Techacademy Software
 
Android tutorial
Keshav Chauhan
 
Android-Tutorial.ppt
siddharthsingh496426
 
Android tutorial
Avinash Nandakumar
 
Introduction to Android Development
Aly Abdelkareem
 
Android Tutorial For Beginners Part-1
Amit Saxena
 
Android Development project
Minhaj Kazi
 
Android For Java Developers
Mike Wolfson
 
Nativa Android Applications development
Alfredo Morresi
 
Introduction to android
Shrijan Tiwari
 
Android best training-in-mumbai
vibrantuser
 
What is Android?
ndalban
 
Android Development Basics
Prajakta Dharmpurikar
 
architecture of android.pptx
allurestore
 

Recently uploaded (20)

PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PPTX
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
PDF
Immersive experiences: what Pharo users do!
ESUG
 
PPTX
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
Presentation about variables and constant.pptx
safalsingh810
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
Immersive experiences: what Pharo users do!
ESUG
 
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
Presentation about variables and constant.pptx
kr2589474
 

Android App Development (Basics)