SlideShare a Scribd company logo
Introduction to Android
     Development
         Can Elmas
        March 07, 2012
Who am I ?
• 2008 GSU graduate
• Software Development Team Leader at Pozitron
   – http://www.pozitron.com

• Interest in mobile platforms
• Experience with mobile platforms such as Symbian
  (Java ME), BlackBerry and Android
• Experience with server side development
Agenda

• What is Android?

• Why Android?

• Android Architecture

• Android Building Blocks

• Demo
What is Android ?
What is Android?
• Software stack for mobile devices including an
  operating system, middleware , key applications
  and rich set of APIs
• Project by Open Handset Alliance led by Google,
  a consortium of 86 companies (Samsung,
  Motorola, Sony, HTC, LG, Dell, Intel, Nvidia etc.)
• First Release in November 2007
What is Android?
• Based on Linux Kernel
• Security, Memory Management, Process Management,
  Network Stack, Driver stack
• No, Android is not Linux (No native windowing system, no
  glibc, no standard GNU/linux utilities)
• Linux Kernel enhancements (alarm, ashmem, power
  management, low memory killer - no swap space)
• Robust and proven over time
What is Android?
• Applications written primarily in customized version of
  Java
• No, android is not Java
   – Uses Java language
   – Implements part of the Java 5 SE specification
     (Collections, generics support)
   – Runs on Dalvik Virtual Machine instead of JVM
   – Multiple VMs
What is Android?
• Free and open
   – No need of any user id or account for SDK access
   – Source at http://source.android.com

• Rich Developer Community
• Cheaper and more innovative Mobile Devices
• Extendable
   – Players can add proprietary functionality to their products
   – Companies can remove functionality if they choose
What is Android?

• Android Market, 450.000 apps as of February
  2012
• 850.000 devices activated every day,
  according to Google’s Andy Rubin
What is Android?

• Mulitasking

• Integrated browser based on WebKit Engine

• 3d Graphics based on the OpenGL Es

• SQLite

• Camera, GPS, compass and accelerometer
Why Android?
Why Android?
• Free SDK
   – Available at http://developer.android.com

• Open Source
• All applications are equal
• Dalvik Virtual Machine
• Development on Windows, Linux or Mac OS
• Starting development easy and cheap
Why Android?
• Rich Development Environment
   – Full Device Emulator
   – Tools for debugging DDMS (Dalvik Debug Monitor Server)
   – Memory and performance profiling

• Rich Documentation
• Very large community and target audience
• Open Market Place
   – Instant publishing
Android Architecture
Android Architecture

• Relies on Linux kernel version 2.6 for core system services
• Every Android application runs on its own process, with its
  own Dalvik Virtual Machine
• C/C++ libraries (Surface Manager , Media Libraries, SQLite
  etc.)
• Native set of core applications including email client, SMS,
  Calendar, maps, browser, contacts and others
Android Building Blocks
Vocabulary
• Activity
• Views
• Resources
• Intents
• Intent Filters
• AndroidManifest.xml
Activity


• What the user see on the screen

• An Android application with User Interface
  consists of one or more Activities.
Activity
Activity
Activity

• Moving through screens is by starting new activities
• Managed as an activity stack
• LIFO (Last In First Out)
• Only one is visible
• Only one is active
• Activity Lifecycle
Source : http://developer.android.com
Activity States
• Active
   – At the top of the stack
• Paused
   – Lost focusbut still visible
   – Can be killed by Low Memory Killer
• Stopped
   – Not at the top of the stack
• Dropped
   – Killed to reclaim its memory
Activity




• An empty activity with no content
Views
• Views are basic UI building blocks
• They know how to draw themselves
   – Android framework responsible for measuring, laying out and drawing
• Respond to events
• Implementation :
   – Java code
   – XML
       – Separation of presentation of the application from the code controlling the
         behavior.
       – Ease of visualization of the UI structure
       – Strings, color, styles, shapes, animations etc can be described as XML
Views
• Views and view groups trees build up
 complex GUIs : widgets
  – android.widget.ListView

  – android.widget.TextView

  – android.widget.Button

  – android.widget.ImageView
Views
• Subclasses of ViewGroup, Layouts
• Standard layouts :
  – LinearLayout
  – FrameLayout
  – TableLayout
  – RelativeLayout
  – AbsoluteLayout
Views
• Android UI in XML : /res/layout/main_act.xml
Resources
• External sources other than your code
  (images, views and layouts in xml, strings
  etc.) should be externalized, so that you can
  maintain them independently
Resources

• Accessing application resources :
  – R class

• All reources IDs are defined in R class, which is
  automatically generated by Android aapt tool
Activity




• An empty activity with no content
Activity
Activity
Intents
• An Intention to do something
• Abstract description of an operation to be performed
• A message to the OS that you want to do something
  (pre-defined action)
• Used to move from one Activity to another
Intents
• Facilitates app to app communication
• Primary Attributes
  – Action
     • The general action to be performed

  – Data
     • The data to operate on (a contact, an url, the new activity
       etc.)
Intent Filters

• Description of what intent an activity is
  capable of handling
Intent Filters
AndroidManifest .xml

• Description of the android application including
  activities, intent receivers, permissions, application
  icon, application name, version information etc.
• It’s the glue that specifies which Intents your activities
  might receive
• An activity should be declared as the main entry point
AndroidManifest.xml
More Advanced Topics

• How Android deal with Fragmentation?
  – API Levels (Cupcake, Donut, Eclair, Froyo,
    Gingerbread, Honeycomb, Ice Cream Sandwich)

• How are the resources selected at run time
  according to different screen sizes and
  densities?
More Advanced Topics


• Single Threaded UI Model

• APK (Android Package)

• Application Signing
Thank you
• We’re Hiring
  – http://pozitron.com/careers.php
  – ik@pozitron.com

• Twitter
  – @foragoodpurpose
  – @Pozitron_Mobile
Demo
• Phase 1:
  – Create a new Android project with package name
    com.gsuandroid.activities
  – Create a new Activity called MainActivity
  – Create a layout for MainActivity which will consist
    of a LinearLayout containing a TextView with
    predefined text “Hello Android”
  – Run your application
Demo
• Phase 2:
   – Create another activity called ActTwo
   – Create a layout for your new activity containing a TextView
     without setting a text in XML
   – Modify your MainActivity’s layout xml in and add a Button with
     setting and id, android:id="@+id/btn_go_to_act_two » and text
     « Go to Next Activity»
   – Start ActTwo when user presses button inserted in the
     MainActivity
   – Run your application
Demo


• Phase 3:
  – Pass a text message “That’s it for today” when
    moving from MainActivity to ActTwo
  – Run your application
Full Code
main_act.xml
act_two.xml
Introduction to Android Development
Introduction to Android Development

More Related Content

What's hot

Software development process basic
Software development process basicSoftware development process basic
Software development process basic
Anurag Tomar
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
Zahoorali Khan
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)
Simran Kaur
 
Waterfall Model PPT in Software Engineering
Waterfall Model PPT in Software EngineeringWaterfall Model PPT in Software Engineering
Waterfall Model PPT in Software Engineering
Raju Sheoran
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
Angelin R
 
Presentation - Rational Unified Process
Presentation - Rational Unified ProcessPresentation - Rational Unified Process
Presentation - Rational Unified ProcessSharad Srivastava
 
SDLC ITS MODEL AND SOFTWARE TESTING
SDLC ITS MODEL AND SOFTWARE TESTING SDLC ITS MODEL AND SOFTWARE TESTING
SDLC ITS MODEL AND SOFTWARE TESTING
Abhinav Shukla
 
MODELS USED IN SOFTWARE DEVELOPMENT
MODELS USED IN SOFTWARE DEVELOPMENTMODELS USED IN SOFTWARE DEVELOPMENT
MODELS USED IN SOFTWARE DEVELOPMENT
PaYal Umraliya
 
Software life cycle comparison
Software life cycle comparisonSoftware life cycle comparison
Software life cycle comparisonSuvek Shakya
 
An introduction to software engineering
An introduction to software engineeringAn introduction to software engineering
An introduction to software engineering
Carlos Gavidia-Calderon
 
Sdlc models
Sdlc modelsSdlc models
Introduction to software engineering
Introduction to software engineeringIntroduction to software engineering
Introduction to software engineering
Hitesh Mohapatra
 
Comparison of Software Engineering Models
Comparison of Software Engineering  ModelsComparison of Software Engineering  Models
Comparison of Software Engineering Modelstahir iqbal
 
The V Model
The V ModelThe V Model
The V Model
Damian T. Gordon
 
Waterfall model
Waterfall modelWaterfall model
Waterfall model
BHARGAV VISANI
 

What's hot (20)

V model in SDLC
V model in SDLCV model in SDLC
V model in SDLC
 
Software development process basic
Software development process basicSoftware development process basic
Software development process basic
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)
 
Waterfall Model PPT in Software Engineering
Waterfall Model PPT in Software EngineeringWaterfall Model PPT in Software Engineering
Waterfall Model PPT in Software Engineering
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
 
Presentation - Rational Unified Process
Presentation - Rational Unified ProcessPresentation - Rational Unified Process
Presentation - Rational Unified Process
 
1.sdlc
1.sdlc1.sdlc
1.sdlc
 
SDLC ITS MODEL AND SOFTWARE TESTING
SDLC ITS MODEL AND SOFTWARE TESTING SDLC ITS MODEL AND SOFTWARE TESTING
SDLC ITS MODEL AND SOFTWARE TESTING
 
MODELS USED IN SOFTWARE DEVELOPMENT
MODELS USED IN SOFTWARE DEVELOPMENTMODELS USED IN SOFTWARE DEVELOPMENT
MODELS USED IN SOFTWARE DEVELOPMENT
 
Software life cycle comparison
Software life cycle comparisonSoftware life cycle comparison
Software life cycle comparison
 
Sdlc
SdlcSdlc
Sdlc
 
Vmodel
VmodelVmodel
Vmodel
 
An introduction to software engineering
An introduction to software engineeringAn introduction to software engineering
An introduction to software engineering
 
Sdlc models
Sdlc modelsSdlc models
Sdlc models
 
Introduction to software engineering
Introduction to software engineeringIntroduction to software engineering
Introduction to software engineering
 
Comparison of Software Engineering Models
Comparison of Software Engineering  ModelsComparison of Software Engineering  Models
Comparison of Software Engineering Models
 
The V Model
The V ModelThe V Model
The V Model
 
Waterfall model
Waterfall modelWaterfall model
Waterfall model
 
Sdlc models
Sdlc modelsSdlc models
Sdlc models
 

Viewers also liked

Architecture pitfalls in android development
Architecture pitfalls in android developmentArchitecture pitfalls in android development
Architecture pitfalls in android development
Thomas Krueger
 
Introduction to Android development
Introduction to Android developmentIntroduction to Android development
Introduction to Android development
Tristan Roddis
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
Kasun Dananjaya Delgolla
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
Kainda Kiniel Daka
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Sander Alberink
 
Windows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application LifecycleWindows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application LifecycleOliver Scheer
 

Viewers also liked (6)

Architecture pitfalls in android development
Architecture pitfalls in android developmentArchitecture pitfalls in android development
Architecture pitfalls in android development
 
Introduction to Android development
Introduction to Android developmentIntroduction to Android development
Introduction to Android development
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Windows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application LifecycleWindows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application Lifecycle
 

Similar to Introduction to Android Development

Introduction to android
Introduction to androidIntroduction to android
Introduction to android
Jawad Mohmand
 
Android development
Android developmentAndroid development
Android development
mkpartners
 
Android Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxAndroid Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptx
DCETechnicalClub
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android applicationsaritasingh19866
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
Purvik Rana
 
Android Application Development.pdf
Android Application Development.pdfAndroid Application Development.pdf
Android Application Development.pdf
MohammedMuzammil99
 
Android app development
Android app developmentAndroid app development
Android app development
Techizzaa
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
SumanKumarDey5
 
Android Application Development (2).ppt
Android Application Development (2).pptAndroid Application Development (2).ppt
Android Application Development (2).ppt
RKRahulKhatri
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
SumanKumarDey5
 
Android application development
Android application developmentAndroid application development
Android application development
shanmukhashannu3
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
AyushThakur97
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
SarikaDontha1
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
SHUBHAMKENDRE5
 
Android application development
Android application developmentAndroid application development
Android application development
MadhuprakashR1
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
TarunSharma506177
 
Android application development
Android application developmentAndroid application development
Android application development
Dewan Razib
 
Synapseindia android apps application development
Synapseindia android apps application developmentSynapseindia android apps application development
Synapseindia android apps application development
Synapseindiappsdevelopment
 

Similar to Introduction to Android Development (20)

Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android development
Android developmentAndroid development
Android development
 
Android Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptxAndroid Application Development GDSC DCE Darbhanga.pptx
Android Application Development GDSC DCE Darbhanga.pptx
 
Synapse india reviews on android application
Synapse india reviews on android applicationSynapse india reviews on android application
Synapse india reviews on android application
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
Android Application Development.pdf
Android Application Development.pdfAndroid Application Development.pdf
Android Application Development.pdf
 
Android app development
Android app developmentAndroid app development
Android app development
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android Application Development (2).ppt
Android Application Development (2).pptAndroid Application Development (2).ppt
Android Application Development (2).ppt
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android Application Development.ppt
Android Application Development.pptAndroid Application Development.ppt
Android Application Development.ppt
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android Training
Android TrainingAndroid Training
Android Training
 
Google android os
Google android osGoogle android os
Google android os
 
Synapseindia android apps application development
Synapseindia android apps application developmentSynapseindia android apps application development
Synapseindia android apps application development
 

Recently uploaded

Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 

Recently uploaded (20)

Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 

Introduction to Android Development

  • 1. Introduction to Android Development Can Elmas March 07, 2012
  • 2. Who am I ? • 2008 GSU graduate • Software Development Team Leader at Pozitron – http://www.pozitron.com • Interest in mobile platforms • Experience with mobile platforms such as Symbian (Java ME), BlackBerry and Android • Experience with server side development
  • 3. Agenda • What is Android? • Why Android? • Android Architecture • Android Building Blocks • Demo
  • 5. What is Android? • Software stack for mobile devices including an operating system, middleware , key applications and rich set of APIs • Project by Open Handset Alliance led by Google, a consortium of 86 companies (Samsung, Motorola, Sony, HTC, LG, Dell, Intel, Nvidia etc.) • First Release in November 2007
  • 6. What is Android? • Based on Linux Kernel • Security, Memory Management, Process Management, Network Stack, Driver stack • No, Android is not Linux (No native windowing system, no glibc, no standard GNU/linux utilities) • Linux Kernel enhancements (alarm, ashmem, power management, low memory killer - no swap space) • Robust and proven over time
  • 7. What is Android? • Applications written primarily in customized version of Java • No, android is not Java – Uses Java language – Implements part of the Java 5 SE specification (Collections, generics support) – Runs on Dalvik Virtual Machine instead of JVM – Multiple VMs
  • 8. What is Android? • Free and open – No need of any user id or account for SDK access – Source at http://source.android.com • Rich Developer Community • Cheaper and more innovative Mobile Devices • Extendable – Players can add proprietary functionality to their products – Companies can remove functionality if they choose
  • 9. What is Android? • Android Market, 450.000 apps as of February 2012 • 850.000 devices activated every day, according to Google’s Andy Rubin
  • 10. What is Android? • Mulitasking • Integrated browser based on WebKit Engine • 3d Graphics based on the OpenGL Es • SQLite • Camera, GPS, compass and accelerometer
  • 12. Why Android? • Free SDK – Available at http://developer.android.com • Open Source • All applications are equal • Dalvik Virtual Machine • Development on Windows, Linux or Mac OS • Starting development easy and cheap
  • 13. Why Android? • Rich Development Environment – Full Device Emulator – Tools for debugging DDMS (Dalvik Debug Monitor Server) – Memory and performance profiling • Rich Documentation • Very large community and target audience • Open Market Place – Instant publishing
  • 15.
  • 16. Android Architecture • Relies on Linux kernel version 2.6 for core system services • Every Android application runs on its own process, with its own Dalvik Virtual Machine • C/C++ libraries (Surface Manager , Media Libraries, SQLite etc.) • Native set of core applications including email client, SMS, Calendar, maps, browser, contacts and others
  • 18. Vocabulary • Activity • Views • Resources • Intents • Intent Filters • AndroidManifest.xml
  • 19. Activity • What the user see on the screen • An Android application with User Interface consists of one or more Activities.
  • 22. Activity • Moving through screens is by starting new activities • Managed as an activity stack • LIFO (Last In First Out) • Only one is visible • Only one is active • Activity Lifecycle
  • 24. Activity States • Active – At the top of the stack • Paused – Lost focusbut still visible – Can be killed by Low Memory Killer • Stopped – Not at the top of the stack • Dropped – Killed to reclaim its memory
  • 25. Activity • An empty activity with no content
  • 26. Views • Views are basic UI building blocks • They know how to draw themselves – Android framework responsible for measuring, laying out and drawing • Respond to events • Implementation : – Java code – XML – Separation of presentation of the application from the code controlling the behavior. – Ease of visualization of the UI structure – Strings, color, styles, shapes, animations etc can be described as XML
  • 27. Views • Views and view groups trees build up complex GUIs : widgets – android.widget.ListView – android.widget.TextView – android.widget.Button – android.widget.ImageView
  • 28. Views • Subclasses of ViewGroup, Layouts • Standard layouts : – LinearLayout – FrameLayout – TableLayout – RelativeLayout – AbsoluteLayout
  • 29. Views • Android UI in XML : /res/layout/main_act.xml
  • 30. Resources • External sources other than your code (images, views and layouts in xml, strings etc.) should be externalized, so that you can maintain them independently
  • 31. Resources • Accessing application resources : – R class • All reources IDs are defined in R class, which is automatically generated by Android aapt tool
  • 32. Activity • An empty activity with no content
  • 35. Intents • An Intention to do something • Abstract description of an operation to be performed • A message to the OS that you want to do something (pre-defined action) • Used to move from one Activity to another
  • 36. Intents • Facilitates app to app communication • Primary Attributes – Action • The general action to be performed – Data • The data to operate on (a contact, an url, the new activity etc.)
  • 37. Intent Filters • Description of what intent an activity is capable of handling
  • 39. AndroidManifest .xml • Description of the android application including activities, intent receivers, permissions, application icon, application name, version information etc. • It’s the glue that specifies which Intents your activities might receive • An activity should be declared as the main entry point
  • 41. More Advanced Topics • How Android deal with Fragmentation? – API Levels (Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwich) • How are the resources selected at run time according to different screen sizes and densities?
  • 42. More Advanced Topics • Single Threaded UI Model • APK (Android Package) • Application Signing
  • 43. Thank you • We’re Hiring – http://pozitron.com/careers.php – ik@pozitron.com • Twitter – @foragoodpurpose – @Pozitron_Mobile
  • 44. Demo • Phase 1: – Create a new Android project with package name com.gsuandroid.activities – Create a new Activity called MainActivity – Create a layout for MainActivity which will consist of a LinearLayout containing a TextView with predefined text “Hello Android” – Run your application
  • 45. Demo • Phase 2: – Create another activity called ActTwo – Create a layout for your new activity containing a TextView without setting a text in XML – Modify your MainActivity’s layout xml in and add a Button with setting and id, android:id="@+id/btn_go_to_act_two » and text « Go to Next Activity» – Start ActTwo when user presses button inserted in the MainActivity – Run your application
  • 46. Demo • Phase 3: – Pass a text message “That’s it for today” when moving from MainActivity to ActTwo – Run your application
  • 48.