SlideShare une entreprise Scribd logo
1  sur  30
February 19, 2011 @ De La Salle University - Dasmariñas
Part 2: Android Application Development 101
Mike Rivera - Señior Android Developer @ Excitor Asia
All about Android Development
✤ First things first
✤ Android Application Components
✤ User Interface
✤ Application Resources
✤ AndroidManifest.xml
✤ How to create Android Apps?
✤ How to Publish Android Applications?
February 19, 2011 @ De La Salle University - Dasmariñas
First things first
Tools you need to learn and understand.
Tools needed
✤ Java SDK
✤ Eclipse IDE
✤ Android SDK
✤ Android Developer Tool (ADT , Eclipse Plug-in)
✤ YOU!
Java SDK
Go To >
http://www.oracle.com/technetwork/java/javase/downloads
Download Java Development Kit (JDK) 6 Update 22(or higher)
Install JDK to your local drive (remember the location)
Simply learn basic Java!
✤ Read about their Variables
✤ Operators
✤ Expressions, Statements and Blocks
✤ Control Flow Statements
You’re set and ready to go on with Android
Programming !
Want to learn more about Java?
✤ If you still have the urge read on OOP
more.
✤ Understand their Classes and Objects
✤ Don’t forget Interfaces and Inheritance
If time permits, understand them (YOU should!)
Eclipse IDE
Go To > http://eclipse.org/downloads/
Download Eclipse IDE for Java Developers (32 bit or 64 bit)
Unzip the file to your desired location
Look for the Eclipse Icon and click it to start.
Select your Operating System (Mac,Windows or Linux)
Android SDK
Download and Install the SDK Starter Package
Select a starter package from the Android Developer Site and download it to your
development computer. To install the SDK, simply unpack the starter package to a safe
location and then add the location to your PATH.
If you are developing in Eclipse, set up a remote update site at
https://dl-ssl.google.com/android/eclipse/. Install the Android
Development Tools (ADT) Plugin, restart Eclipse, and set the "Android" preferences in
Eclipse to point to the SDK install location.
Install the ADT Plugin for Eclipse
Use the Android SDK and AVD Manager, included in the SDK starter package, to add
one or more Android platforms (for example, Android 1.6 or Android 2.2) and other
components to your SDK
Add Android platforms and other components to your SDK
Android Application Components
✤ Activites
✤ Services
✤ BroadcastReceivers
✤ ContentProviders
Intents
Activities
✤ Presentation Layer of the
Application you are
building
✤ For each screen you need
a matching Activity
✤ An Activity uses Views to
build the User Interfaces
✤ Represents a screen or
window. Sort of.
Intents
✤ Represents events or
actions
✤ They are to Android Apps
what hyperlinks are to
websites. Sort of.
✤ Holds content of the
message
✤ Can be implicit or explicit.
Services
✤ Represents events or
actions
✤ Do not interact with the
users.
✤ Can update your data
sources and Activities,
and trigger specific
notifications.
ContentProviders
✤ Manage and share
application across
application boundaries
✤ Data can be stored in the
file system, in an SQLite
database, or in any other
manner that makes sense.
✤ Ex. of built-in content
providers: Contacts &
MediaStore.
BroadcastReceivers
✤ Listen for broadcast
Intents that match some
defined filter criteria
✤ Can automatically start
your application as a
response to an intent.
✤ Intent-based published
subscribe mechanism.
Listens for system events
like SMS.
User Interfaces
✤ There are two UI approaches: procedural and declarative (xml code)
✤ You can mix both approaches.
User Interfaces
Best Practice
✤ Start with XML (declarative), and create most of the UI’s.
✤ Switch to Java and implement the UI logic by hooking up the control
Id.
From your xml layout code:
<ListView
android:id="@+id/myListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
From your Activity class code:
ListView myListView =
(ListView)findViewById(R.id.myListView);
Procedural code:
ListView myListView = new ListView(this);
setContentView(myTextView);
UI: Views and ViewGroups
UI: Views
✤ Basic UI Component
✤ A.k.a Widgets / Control
✤ Responsible for drawing and event-
handling.
✤ Android UI includes many modern
UI’s widgets and composite ones such
as Buttons, Tabs, ListViews,
ProgressBar, Time and Date Pickers
etc.
UI: ViewGroups
✤ A.k.a Layouts
✤ Most common way to define your
layout and express the view
hierarchy is with an XML layout
file
✤ Using more and different kinds of
view groups, you can structure
child views and view groups in an
infinite number of ways.
LinearLayout: one of the
most commonly used
layout
UI: Dialogs and Menus
Dialogs
a small window that appears in front of the current Activity
(Alert,Progress,DatePicker, TimePicker and a custom one)
Menus
Concerned about having to much functionality on the screen => use
menus
Application Resources
External files (that are, non-code files) that are used by your code and
compiled into your application at build time. Android supports a
number of different kinds of resource files, including XML, PNG, and
JPEG files.
At compile time, Android generates a class named R that contains resource identifiers to all the resources in your
program. This class contains several subclasses, one for each type of resource supported by Android, and for which
you provided a resource file.
• res/anim - XML files for animations
• res/drawable – image files
• res/layout – XML files for screen layouts
• res/values – XML files that can be compiled into many kinds of
resources
• res/xml – Arbitrary XML files that are compiled and can be read
at run time.
• res/raw – Arbitrary files to copy directly to the device
AndroidManifest.xml
✤ It describes the components of the application — the activities,
services, broadcast receivers, and content providers that the
application is composed of.
✤ It declares which permissions the application must have in order to
access protected parts of the API and interact with other
applications.
✤ It declares the minimum level of the Android API that the
application requires.
✤ It lists the libraries that the application must be linked against.
Remember this is the most important file & these are just some
of the things it can do.
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest . . . >
<application . . . >
<activity android:name="com.example.FreneticActivity"
android:icon="@drawable/small_pic.png"
android:label="@string/freneticLabel"
. . . >
</activity>
. . .
</application>
</manifest>
How to create Android Apps?
✤ All our tools are set (right?)
✤ We create an AVD (Android Virtual Device)
✤ Create New Android Project
✤ Construct the UI (either in java or xml)
✤ Do our logic in Java.
✤ Build,Compile and Run
✤ Check logs and other cool stuff in DDMS
✤ Debug if necessary!
How to publish Android Apps?
Before you consider your application ready for release:
1.Test your application extensively on an actual device
2.Consider adding an End User License Agreement in your application
3.Consider adding licensing support
4.Specify an icon and label in the application's manifest
5.Turn off logging and debugging and clean up data/files
Before you do the final compile of your application:
1.Version your application
2.Obtain a suitable cryptographic key
3.Register for a Maps API Key, if your application is using MapView elements
Compile your application
After you compile your application:
•Sign your application
•Test your compiled application
How to publish Android Apps?
1.) When testing was successfully passed ( you think so?)
• ) Go to Android Market
1.) Create an account (pay $25 one time devoper fee)
• ) Follow instructions from there
1.) Congratulations you just published your first ever Android
Application
• ) Now wait for the revenue to get into your bank!
* Check on the customers feedback it will help you create the
application much better!
February 19, 2011 @ De La Salle University - Dasmariñas
Your Turn...
Hands-on , creating your first Android Application
February 19, 2011 @ De La Salle University - Dasmariñas
Need more information about Android?
We are done...got questions?
30
References
• http://en.wikipedia.org/wiki/Android_(operating_system)
• http://www.ibm.com/developerworks/opensource/library/os-android-
• http://www.wrox.com/WileyCDA/WroxTitle/Professional-Android-A
• http://groups.google.com/group/android-beginners
• http://developer.android.com/index.html
• Androidtapp.com
• Ed Brunette Hello Android
30

Contenu connexe

Tendances

Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1Borhan Otour
 
Android Development: Build Android App from Scratch
Android Development: Build Android App from ScratchAndroid Development: Build Android App from Scratch
Android Development: Build Android App from ScratchTaufan Erfiyanto
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studioParinita03
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_startedAhsanul Karim
 
Five android architecture
Five android architectureFive android architecture
Five android architectureTomislav Homan
 
Generating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving PerformanceGenerating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving PerformanceParesh Mayani
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OSPankaj Maheshwari
 
01 04 - android set up and creating an android project
01  04 - android set up and creating an android project01  04 - android set up and creating an android project
01 04 - android set up and creating an android projectSiva Kumar reddy Vasipally
 
Simple Android Project (SAP)... A Test Application
Simple Android Project (SAP)... A Test ApplicationSimple Android Project (SAP)... A Test Application
Simple Android Project (SAP)... A Test ApplicationAritra Mukherjee
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android ApplicationArcadian Learning
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 
Introduction to android coding
Introduction to android codingIntroduction to android coding
Introduction to android codingHari Krishna
 
Android Studio Overview
Android Studio OverviewAndroid Studio Overview
Android Studio OverviewSalim Hosen
 
Lecture #1 Creating your first android project
Lecture #1  Creating your first android projectLecture #1  Creating your first android project
Lecture #1 Creating your first android projectVitali Pekelis
 

Tendances (20)

Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1
 
Android Development: Build Android App from Scratch
Android Development: Build Android App from ScratchAndroid Development: Build Android App from Scratch
Android Development: Build Android App from Scratch
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_started
 
Android Lab
Android LabAndroid Lab
Android Lab
 
Five android architecture
Five android architectureFive android architecture
Five android architecture
 
Generating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving PerformanceGenerating efficient APK by Reducing Size and Improving Performance
Generating efficient APK by Reducing Size and Improving Performance
 
Android Intro
Android IntroAndroid Intro
Android Intro
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OS
 
01 04 - android set up and creating an android project
01  04 - android set up and creating an android project01  04 - android set up and creating an android project
01 04 - android set up and creating an android project
 
Simple Android Project (SAP)... A Test Application
Simple Android Project (SAP)... A Test ApplicationSimple Android Project (SAP)... A Test Application
Simple Android Project (SAP)... A Test Application
 
Android studio
Android studioAndroid studio
Android studio
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android Application
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 
Introduction to android coding
Introduction to android codingIntroduction to android coding
Introduction to android coding
 
Android Studio Overview
Android Studio OverviewAndroid Studio Overview
Android Studio Overview
 
Lecture #1 Creating your first android project
Lecture #1  Creating your first android projectLecture #1  Creating your first android project
Lecture #1 Creating your first android project
 
GUI JAVA PROG ~hmftj
GUI  JAVA PROG ~hmftjGUI  JAVA PROG ~hmftj
GUI JAVA PROG ~hmftj
 

Similaire à Android App Development 101: All You Need to Know

Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
 
Android introduction
Android introductionAndroid introduction
Android introductionPingLun Liao
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptxVaibhavKhunger2
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsiaMichael Angelo Rivera
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
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
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android StudioSuyash Srijan
 
Mobile application development
Mobile application developmentMobile application development
Mobile application developmentumesh patil
 
5 beginner android application development foundation
5 beginner android application development foundation5 beginner android application development foundation
5 beginner android application development foundationCbitss Technologies
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 

Similaire à Android App Development 101: All You Need to Know (20)

Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Android introduction
Android introductionAndroid introduction
Android introduction
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptx
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
 
Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
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
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Android Development Basics
Android Development BasicsAndroid Development Basics
Android Development Basics
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
5 beginner android application development foundation
5 beginner android application development foundation5 beginner android application development foundation
5 beginner android application development foundation
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
 
Android studio
Android studioAndroid studio
Android studio
 

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

Android App Development 101: All You Need to Know

  • 1. February 19, 2011 @ De La Salle University - Dasmariñas Part 2: Android Application Development 101 Mike Rivera - Señior Android Developer @ Excitor Asia
  • 2. All about Android Development ✤ First things first ✤ Android Application Components ✤ User Interface ✤ Application Resources ✤ AndroidManifest.xml ✤ How to create Android Apps? ✤ How to Publish Android Applications?
  • 3. February 19, 2011 @ De La Salle University - Dasmariñas First things first Tools you need to learn and understand.
  • 4. Tools needed ✤ Java SDK ✤ Eclipse IDE ✤ Android SDK ✤ Android Developer Tool (ADT , Eclipse Plug-in) ✤ YOU!
  • 5. Java SDK Go To > http://www.oracle.com/technetwork/java/javase/downloads Download Java Development Kit (JDK) 6 Update 22(or higher) Install JDK to your local drive (remember the location)
  • 6. Simply learn basic Java! ✤ Read about their Variables ✤ Operators ✤ Expressions, Statements and Blocks ✤ Control Flow Statements You’re set and ready to go on with Android Programming !
  • 7. Want to learn more about Java? ✤ If you still have the urge read on OOP more. ✤ Understand their Classes and Objects ✤ Don’t forget Interfaces and Inheritance If time permits, understand them (YOU should!)
  • 8. Eclipse IDE Go To > http://eclipse.org/downloads/ Download Eclipse IDE for Java Developers (32 bit or 64 bit) Unzip the file to your desired location Look for the Eclipse Icon and click it to start. Select your Operating System (Mac,Windows or Linux)
  • 9. Android SDK Download and Install the SDK Starter Package Select a starter package from the Android Developer Site and download it to your development computer. To install the SDK, simply unpack the starter package to a safe location and then add the location to your PATH. If you are developing in Eclipse, set up a remote update site at https://dl-ssl.google.com/android/eclipse/. Install the Android Development Tools (ADT) Plugin, restart Eclipse, and set the "Android" preferences in Eclipse to point to the SDK install location. Install the ADT Plugin for Eclipse Use the Android SDK and AVD Manager, included in the SDK starter package, to add one or more Android platforms (for example, Android 1.6 or Android 2.2) and other components to your SDK Add Android platforms and other components to your SDK
  • 10. Android Application Components ✤ Activites ✤ Services ✤ BroadcastReceivers ✤ ContentProviders Intents
  • 11. Activities ✤ Presentation Layer of the Application you are building ✤ For each screen you need a matching Activity ✤ An Activity uses Views to build the User Interfaces ✤ Represents a screen or window. Sort of.
  • 12. Intents ✤ Represents events or actions ✤ They are to Android Apps what hyperlinks are to websites. Sort of. ✤ Holds content of the message ✤ Can be implicit or explicit.
  • 13. Services ✤ Represents events or actions ✤ Do not interact with the users. ✤ Can update your data sources and Activities, and trigger specific notifications.
  • 14. ContentProviders ✤ Manage and share application across application boundaries ✤ Data can be stored in the file system, in an SQLite database, or in any other manner that makes sense. ✤ Ex. of built-in content providers: Contacts & MediaStore.
  • 15. BroadcastReceivers ✤ Listen for broadcast Intents that match some defined filter criteria ✤ Can automatically start your application as a response to an intent. ✤ Intent-based published subscribe mechanism. Listens for system events like SMS.
  • 16. User Interfaces ✤ There are two UI approaches: procedural and declarative (xml code) ✤ You can mix both approaches.
  • 17. User Interfaces Best Practice ✤ Start with XML (declarative), and create most of the UI’s. ✤ Switch to Java and implement the UI logic by hooking up the control Id. From your xml layout code: <ListView android:id="@+id/myListView" android:layout_width="fill_parent" android:layout_height="wrap_content" /> From your Activity class code: ListView myListView = (ListView)findViewById(R.id.myListView); Procedural code: ListView myListView = new ListView(this); setContentView(myTextView);
  • 18. UI: Views and ViewGroups
  • 19. UI: Views ✤ Basic UI Component ✤ A.k.a Widgets / Control ✤ Responsible for drawing and event- handling. ✤ Android UI includes many modern UI’s widgets and composite ones such as Buttons, Tabs, ListViews, ProgressBar, Time and Date Pickers etc.
  • 20. UI: ViewGroups ✤ A.k.a Layouts ✤ Most common way to define your layout and express the view hierarchy is with an XML layout file ✤ Using more and different kinds of view groups, you can structure child views and view groups in an infinite number of ways. LinearLayout: one of the most commonly used layout
  • 21. UI: Dialogs and Menus Dialogs a small window that appears in front of the current Activity (Alert,Progress,DatePicker, TimePicker and a custom one) Menus Concerned about having to much functionality on the screen => use menus
  • 22. Application Resources External files (that are, non-code files) that are used by your code and compiled into your application at build time. Android supports a number of different kinds of resource files, including XML, PNG, and JPEG files. At compile time, Android generates a class named R that contains resource identifiers to all the resources in your program. This class contains several subclasses, one for each type of resource supported by Android, and for which you provided a resource file. • res/anim - XML files for animations • res/drawable – image files • res/layout – XML files for screen layouts • res/values – XML files that can be compiled into many kinds of resources • res/xml – Arbitrary XML files that are compiled and can be read at run time. • res/raw – Arbitrary files to copy directly to the device
  • 23. AndroidManifest.xml ✤ It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. ✤ It declares which permissions the application must have in order to access protected parts of the API and interact with other applications. ✤ It declares the minimum level of the Android API that the application requires. ✤ It lists the libraries that the application must be linked against. Remember this is the most important file & these are just some of the things it can do.
  • 24. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest . . . > <application . . . > <activity android:name="com.example.FreneticActivity" android:icon="@drawable/small_pic.png" android:label="@string/freneticLabel" . . . > </activity> . . . </application> </manifest>
  • 25. How to create Android Apps? ✤ All our tools are set (right?) ✤ We create an AVD (Android Virtual Device) ✤ Create New Android Project ✤ Construct the UI (either in java or xml) ✤ Do our logic in Java. ✤ Build,Compile and Run ✤ Check logs and other cool stuff in DDMS ✤ Debug if necessary!
  • 26. How to publish Android Apps? Before you consider your application ready for release: 1.Test your application extensively on an actual device 2.Consider adding an End User License Agreement in your application 3.Consider adding licensing support 4.Specify an icon and label in the application's manifest 5.Turn off logging and debugging and clean up data/files Before you do the final compile of your application: 1.Version your application 2.Obtain a suitable cryptographic key 3.Register for a Maps API Key, if your application is using MapView elements Compile your application After you compile your application: •Sign your application •Test your compiled application
  • 27. How to publish Android Apps? 1.) When testing was successfully passed ( you think so?) • ) Go to Android Market 1.) Create an account (pay $25 one time devoper fee) • ) Follow instructions from there 1.) Congratulations you just published your first ever Android Application • ) Now wait for the revenue to get into your bank! * Check on the customers feedback it will help you create the application much better!
  • 28. February 19, 2011 @ De La Salle University - Dasmariñas Your Turn... Hands-on , creating your first Android Application
  • 29. February 19, 2011 @ De La Salle University - Dasmariñas Need more information about Android? We are done...got questions?
  • 30. 30 References • http://en.wikipedia.org/wiki/Android_(operating_system) • http://www.ibm.com/developerworks/opensource/library/os-android- • http://www.wrox.com/WileyCDA/WroxTitle/Professional-Android-A • http://groups.google.com/group/android-beginners • http://developer.android.com/index.html • Androidtapp.com • Ed Brunette Hello Android 30