SlideShare una empresa de Scribd logo
1 de 27
Android Application Development
101
Mike Rivera
TresMax Asia
March 12, 2010
What’s in store today?
• What is Android?
• Android Architecture
• Getting Android?
• Application Components
• User Interfaces
• Resources
• The Manifest File
• Understanding Hello Android
What’s in store today?
• What is Android?
• Android Architecture
• Getting Android?
• Application Components
• User Interfaces
• Resources
• The Manifest File
• Understanding Hello Android
What is Android
• Android is a software stack for mobile devices
that includes:
– Operating System
• Linux version 2.6
– Services include hardware drivers; power, process and memory
management; security and network.
– Middleware
• Libraries (i.e. SQLite, OpenGL, WebKit, etc.)
• Android Runtime (Dalvik Virtual Machine and core libraries)
• Application Framework
– Abstraction for hardware access; manages application resources and the UI;
provides classes for developing applications for Android
– Applications
• Native apps: Contacts, Phone, Browser, etc.
• Third-party apps: developer’s applications.
Next is the...
• What is Android?
• Android Architecture
• Getting Android?
• Application Components
• User Interfaces
• Resources
• The Manifest File
• Understanding Hello Android
Android Architecture
Next is ...
• What is Android?
• Android Architecture
• Getting Android?
• Application Components
• User Interfaces
• Resources
• The Manifest File
• Understanding Hello Android
Getting Android

Install JDK (5 or 6) & Eclipse (3.4 or 3.5)

Download & Install the Android SDK (2.1)
- http://developer.android.com/sdk/index.html
- simply unpack the starter package to a safe location and then add
the location to your PATH.

Install and Configure ADT (Android
Development Tool) plug-in for Eclipse

Add Android Platforms & other components
to your SDK
Next is the...
• What is Android?
• Android Architecture
• Getting Android?
• Application Components
• User Interfaces
• Resources
• The Manifest File
• Understanding Hello Android
Application Components
• Components of your application:
– Activities
• Presentation layer for the application you are building
• For each screen you have, their will be a matching
Activity
• An Activity uses Views to build the user interface
– Services
• Components that run in the background
• Do not interact with the user
• Can update your data sources and Activities, and trigger
specific notifications
Application Components
• Components of your application:
– Content Providers
• Manage and share application databases
– Intents
• Specify what intentions you have in terms of a specific
action being performed
– Broadcast Receivers
• Listen for broadcast Intents that match some defined filter
criteria
• Can automatically start your application as a response to
an intent
Next is the...
• What is Android?
• Android Architecture
• Getting Android?
• Application Components
• User Interfaces
• Resources
• The Manifest File
• Understanding Hello Android
User Interfaces
• Views
– The basic UI component
– Responsible for drawing and event handling
– Define your View through:
• Layout Resources (i.e. defined in main.xml file):
<ListView
android:id="@+id/myListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
From your Activity class code:
setContentView(R.layout.main);
ListView myListView = (ListView)findViewById(R.id.myListView);
• Inside your code:
ListView myListView = new ListView(this);
setContentView(myTextView);
14
User Interfaces (cont.)
• Layouts
– Specify the position of child views (controls) on the
screen
– Common Layout Objects:
• FrameLayout: all child views are pinned to the top left corner of the
screen
• LinearLayout: each child view is added in a straight line (vertically
or horizontally)
• TableLayout: add views using a grid of rows and columns
• RelativeLayout: add views relative to the position of other views
or to its parent.
• AbsoluteLayout: for each view you add, you specify the exact
screen coordinate to display on the screen
15
User Interfaces (cont.)
• Implement layouts in XML using external resources:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText
android:id="@+id/myEditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
/>
<ListView
android:id="@+id/myListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
16
User Interfaces (cont.)
• 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
– Three menu types:
• Icon Menu: appears at the bottom of the screen when the
user presses the Menu button. It can display icons and
text for up to six menu items.
• Expanded Menu: displays a scrollable list of menu items
not previously displayed in the icon menu.
• Submenu: displayed as a floating window.
Next is the...
• What is Android?
• Android Architecture
• Getting Android?
• Application Components
• User Interfaces
• Resources
• The Manifest File
• Understanding Hello Android
Resources
External files (that is, 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.
• 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
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.
What’s in store today?

What is Android?

Android Architecture

Getting Android?

Application Components

User Interfaces

Resources

The Manifest File

Understanding Hello Android
The Manifest File
• a structured XML file and is always named
AndroidManifest.xml for all applications.
• It does a number of things in addition to declaring the
application's components, such as naming any libraries the
application needs to be linked against (besides the default
Android library) and identifying any permissions the application
expects to be granted.
<?xml version="1.0" encoding="utf-8"?>
<manifest . . . >
<application . . . >
<activity android:name="com.example.project.FreneticActivity"
android:icon="@drawable/small_pic.png"
android:label="@string/freneticLabel"
. . . >
</activity>
. . .
</application>
</manifest>
What’s in store today?

What is Android?

Android Architecture

Getting Android?

Application Components

User Interfaces

Resources

The Manifest File

Understanding Hello Android
Understanding Hello Android
import android.app.Activity;
import android.os.Bundle;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
HelloAndroid Activity
Understanding Hello Android
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
main.xml
Understanding Hello Android
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello Android !!!</string>
<string name="app_name">Hello Android Demo</string>
</resources>
strings.xml
Understanding Hello Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="asia.tresmax"
android:versionCode="1"android:versionName="1.0.0">
<application android:icon="@drawable/icon"
android:label="@string/app_name">
<activity android:name=".HelloAndroid" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest> AndroidManifest.xml
Reference
• http://developer.android.com/guide/index.ht
ml
Droid Time !!!
Very Simple Twitter Client in
Android

Más contenido relacionado

La actualidad más candente

Introduction to android
Introduction to androidIntroduction to android
Introduction to androidJindal Gohil
 
01 11 - graphical user interface - fonts-web-tab
01  11 - graphical user interface - fonts-web-tab01  11 - graphical user interface - fonts-web-tab
01 11 - graphical user interface - fonts-web-tabSiva Kumar reddy Vasipally
 
Android Training - Part 2
Android Training - Part 2Android Training - Part 2
Android Training - Part 2Tbldevelopment
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialmaster760
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplicationpoojapainter
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App DevelopmentAbhijeet Gupta
 
Android Application Fundamentals
Android Application FundamentalsAndroid Application Fundamentals
Android Application FundamentalsVikalp Jain
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principlesHenk Laracker
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginnerAjailal Parackal
 
Android application development
Android application developmentAndroid application development
Android application developmentMadhuprakashR1
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndy Scherzinger
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android StudioSuyash Srijan
 
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]Sittiphol Phanvilai
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App DevelopmentMike Kvintus
 

La actualidad más candente (20)

Ci for Android
Ci for AndroidCi for Android
Ci for Android
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
01 11 - graphical user interface - fonts-web-tab
01  11 - graphical user interface - fonts-web-tab01  11 - graphical user interface - fonts-web-tab
01 11 - graphical user interface - fonts-web-tab
 
Android overview
Android overviewAndroid overview
Android overview
 
Android Training - Part 2
Android Training - Part 2Android Training - Part 2
Android Training - Part 2
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Anatomy of android aplication
Anatomy of android aplicationAnatomy of android aplication
Anatomy of android aplication
 
IntroToAndroid
IntroToAndroidIntroToAndroid
IntroToAndroid
 
Ramakri
RamakriRamakri
Ramakri
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App Development
 
Android Application Fundamentals
Android Application FundamentalsAndroid Application Fundamentals
Android Application Fundamentals
 
Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With Android
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principles
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 

Destacado

Destacado (6)

Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Agile Process - Developers Perspective on Scrum
Agile Process - Developers Perspective on ScrumAgile Process - Developers Perspective on Scrum
Agile Process - Developers Perspective on Scrum
 
Android Applications Development
Android Applications DevelopmentAndroid Applications Development
Android Applications Development
 
Android Project Presentation
Android Project PresentationAndroid Project Presentation
Android Project Presentation
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android ppt
Android ppt Android ppt
Android ppt
 

Similar a Android application development for TresmaxAsia

Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1Purvik Rana
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its FeaturesHarshad Lokhande
 
Mobile application development
Mobile application developmentMobile application development
Mobile application developmentumesh patil
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptxasmeerana605
 
Android Training in chandigarh 123456789
Android Training in chandigarh 123456789Android Training in chandigarh 123456789
Android Training in chandigarh 123456789asmeerana605
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introductionaswapnal
 
Android introduction
Android introductionAndroid introduction
Android introductionPingLun Liao
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Mohammed Adam
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Android development
Android developmentAndroid development
Android developmentmkpartners
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013DuckMa
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfAbdullahMunir32
 

Similar a Android application development for TresmaxAsia (20)

Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Android OS and its Features
Android OS and its FeaturesAndroid OS and its Features
Android OS and its Features
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Introduction to Android Development.pptx
Introduction to Android Development.pptxIntroduction to Android Development.pptx
Introduction to Android Development.pptx
 
Android Training in chandigarh 123456789
Android Training in chandigarh 123456789Android Training in chandigarh 123456789
Android Training in chandigarh 123456789
 
Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Android introduction
Android introductionAndroid introduction
Android introduction
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Android development
Android developmentAndroid development
Android development
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdf
 
Hello androidforyarlmeetup
Hello androidforyarlmeetupHello androidforyarlmeetup
Hello androidforyarlmeetup
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 

Android application development for TresmaxAsia

  • 1. Android Application Development 101 Mike Rivera TresMax Asia March 12, 2010
  • 2. What’s in store today? • What is Android? • Android Architecture • Getting Android? • Application Components • User Interfaces • Resources • The Manifest File • Understanding Hello Android
  • 3. What’s in store today? • What is Android? • Android Architecture • Getting Android? • Application Components • User Interfaces • Resources • The Manifest File • Understanding Hello Android
  • 4. What is Android • Android is a software stack for mobile devices that includes: – Operating System • Linux version 2.6 – Services include hardware drivers; power, process and memory management; security and network. – Middleware • Libraries (i.e. SQLite, OpenGL, WebKit, etc.) • Android Runtime (Dalvik Virtual Machine and core libraries) • Application Framework – Abstraction for hardware access; manages application resources and the UI; provides classes for developing applications for Android – Applications • Native apps: Contacts, Phone, Browser, etc. • Third-party apps: developer’s applications.
  • 5. Next is the... • What is Android? • Android Architecture • Getting Android? • Application Components • User Interfaces • Resources • The Manifest File • Understanding Hello Android
  • 7. Next is ... • What is Android? • Android Architecture • Getting Android? • Application Components • User Interfaces • Resources • The Manifest File • Understanding Hello Android
  • 8. Getting Android  Install JDK (5 or 6) & Eclipse (3.4 or 3.5)  Download & Install the Android SDK (2.1) - http://developer.android.com/sdk/index.html - simply unpack the starter package to a safe location and then add the location to your PATH.  Install and Configure ADT (Android Development Tool) plug-in for Eclipse  Add Android Platforms & other components to your SDK
  • 9. Next is the... • What is Android? • Android Architecture • Getting Android? • Application Components • User Interfaces • Resources • The Manifest File • Understanding Hello Android
  • 10. Application Components • Components of your application: – Activities • Presentation layer for the application you are building • For each screen you have, their will be a matching Activity • An Activity uses Views to build the user interface – Services • Components that run in the background • Do not interact with the user • Can update your data sources and Activities, and trigger specific notifications
  • 11. Application Components • Components of your application: – Content Providers • Manage and share application databases – Intents • Specify what intentions you have in terms of a specific action being performed – Broadcast Receivers • Listen for broadcast Intents that match some defined filter criteria • Can automatically start your application as a response to an intent
  • 12. Next is the... • What is Android? • Android Architecture • Getting Android? • Application Components • User Interfaces • Resources • The Manifest File • Understanding Hello Android
  • 13. User Interfaces • Views – The basic UI component – Responsible for drawing and event handling – Define your View through: • Layout Resources (i.e. defined in main.xml file): <ListView android:id="@+id/myListView" android:layout_width="fill_parent" android:layout_height="wrap_content" /> From your Activity class code: setContentView(R.layout.main); ListView myListView = (ListView)findViewById(R.id.myListView); • Inside your code: ListView myListView = new ListView(this); setContentView(myTextView);
  • 14. 14 User Interfaces (cont.) • Layouts – Specify the position of child views (controls) on the screen – Common Layout Objects: • FrameLayout: all child views are pinned to the top left corner of the screen • LinearLayout: each child view is added in a straight line (vertically or horizontally) • TableLayout: add views using a grid of rows and columns • RelativeLayout: add views relative to the position of other views or to its parent. • AbsoluteLayout: for each view you add, you specify the exact screen coordinate to display on the screen
  • 15. 15 User Interfaces (cont.) • Implement layouts in XML using external resources: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <EditText android:id="@+id/myEditText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" /> <ListView android:id="@+id/myListView" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout>
  • 16. 16 User Interfaces (cont.) • 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 – Three menu types: • Icon Menu: appears at the bottom of the screen when the user presses the Menu button. It can display icons and text for up to six menu items. • Expanded Menu: displays a scrollable list of menu items not previously displayed in the icon menu. • Submenu: displayed as a floating window.
  • 17. Next is the... • What is Android? • Android Architecture • Getting Android? • Application Components • User Interfaces • Resources • The Manifest File • Understanding Hello Android
  • 18. Resources External files (that is, 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. • 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 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.
  • 19. What’s in store today?  What is Android?  Android Architecture  Getting Android?  Application Components  User Interfaces  Resources  The Manifest File  Understanding Hello Android
  • 20. The Manifest File • a structured XML file and is always named AndroidManifest.xml for all applications. • It does a number of things in addition to declaring the application's components, such as naming any libraries the application needs to be linked against (besides the default Android library) and identifying any permissions the application expects to be granted. <?xml version="1.0" encoding="utf-8"?> <manifest . . . > <application . . . > <activity android:name="com.example.project.FreneticActivity" android:icon="@drawable/small_pic.png" android:label="@string/freneticLabel" . . . > </activity> . . . </application> </manifest>
  • 21. What’s in store today?  What is Android?  Android Architecture  Getting Android?  Application Components  User Interfaces  Resources  The Manifest File  Understanding Hello Android
  • 22. Understanding Hello Android import android.app.Activity; import android.os.Bundle; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } HelloAndroid Activity
  • 23. Understanding Hello Android <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout> main.xml
  • 24. Understanding Hello Android <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello Android !!!</string> <string name="app_name">Hello Android Demo</string> </resources> strings.xml
  • 25. Understanding Hello Android <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="asia.tresmax" android:versionCode="1"android:versionName="1.0.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloAndroid" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> AndroidManifest.xml
  • 27. Droid Time !!! Very Simple Twitter Client in Android