SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

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