SlideShare a Scribd company logo
12/1/2011




                                          Mobile Application
                                          Development
                                          with ANDROID
                                                        Piya Sankhati ( Jenk )




                                          Agenda
                          Mobile Application Development (MAD)
                          Intro to Android platform
                          Platform architecture
                          Application building blocks
                          Development tools
                          Hello Android
                          Resources




Present at Business Computer @Sci North
Chiang Mai                                                                              1
12/1/2011




                                 Mobile Applications
                    Mobile Apps are apps or services that can be pushed to a
                    mobile device or downloaded and installed locally.
                    Classification
                     • Browser-based: apps/services developed in a markup language
                     • Native: compiled applications (device has a runtime
                       environment). Interactive apps such as downloadable games.
                     • Hybrid: the best of both worlds (a browser is needed for
                       discovery)




                                    What is Android
                       Android is an open source operating system, created by Google
                       specifically for use on mobile devices (cell phones and tablets)

                       Linux based (2.6 kernel)

                       Can be programmed in C/C++ but most app development is
                       done in Java (Java access to C Libraries via JNI (Java Native
                       Interface))

                       Supports Bluetooth, Wi-Fi, and 3G and 4G networking




Present at Business Computer @Sci North
Chiang Mai                                                                                       2
12/1/2011




                                    Why Android?
                          Open source
                          Lots of samples
                          Popular
                          Free to develop
                          JAVA based
                          Easily shared




                         The Android Software Stack




Present at Business Computer @Sci North
Chiang Mai                                                   3
12/1/2011




                                     Linux Kernel
                   • Works as a HAL
                   • Device drivers
                   • Memory management
                   • Process management
                   • Networking




                                          Libraries
                   • C/C++ libraries
                   • Interface through Java
                   • Surface manager – Handling UI Windows
                   • 2D and 3D graphics
                   • Media codecs, SQLite, Browser engine




Present at Business Computer @Sci North
Chiang Mai                                                          4
12/1/2011




                                 Android Runtime
                   • Dalvik VM
                       – Dex files
                       – Compact and efficient than class files
                       – Limited memory and battery power
                   • Core Libraries
                       – Java 5 Std edition
                       – Collections, I/O etc…




                             Application Framework



                   • API interface
                   • Activity manager – manages application life
                     cycle.




Present at Business Computer @Sci North
Chiang Mai                                                                5
12/1/2011




                                     Applications


                   • Built in and user apps
                   • Can replace built in apps




                               Android Application
                                 Development

                                                     Android
                                      Eclipse IDE
                                                      SDK




                                                     Android
                                          Android
                                                     Mobile
                                          Emulator
                                                     Device




Present at Business Computer @Sci North
Chiang Mai                                                            6
12/1/2011




                                  Android development


                                     Java Source
                       Android
                       Manifest
                                     Generated        Java        .dex    Dalvik
                                     Class          Compiler       File    VM
                       Resource
                       XML
                                     Android
                                     Libraries




                       Android Application Types
                       Foreground applications
                          need cool UIs (sudoku)
                       Background services & intent receivers
                          little to no user input (back-up assistant)
                       Intermittent applications
                          combination of visible & invisible (music)
                       Widgets
                         dynamic data displays (date/time)




Present at Business Computer @Sci North
Chiang Mai                                                                                7
12/1/2011




                           Foreground applications




                               Background Service




Present at Business Computer @Sci North
Chiang Mai                                                  8
12/1/2011




                          Intermittent applications




                              Home Screen Widget




Present at Business Computer @Sci North
Chiang Mai                                                   9
12/1/2011




                              Pre-installRequirements
                      JDK 5 or JDK 6 (JAVA DevelopementKit)
                      http://www.oracle.com/technetwork/java/javase/downloads/in
                      dex.html
                      Eclipse 3.3 orlater
                      http://www.eclipse.org/downloads/
                      ADT Plugin for Eclipse
                      http://developer.android.com/sdk/eclipse-adt.html
                      Android SDK
                      http://developer.android.com/sdk/index.html
                      EmulatororAndroiddevice




                                    Introduction (cont.)
                       Design Considerations:
                          Low processing speed
                             Optimize code to run quick and efficiently
                          Limited storage and memory
                             Minimize size of applications; reuse and share data
                          Limited bandwidth and high latency
                             Design your application to be responsive to a slow (sometimes non-
                             existent), intermittent network connection
                          Limited battery life
                             Avoid expensive operations
                          Low resolution, small screen size
                             “Compress” the data you want to display




Present at Business Computer @Sci North
Chiang Mai                                                                                              10
12/1/2011




                    Application Components and Lifecycle
                       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




                     Android Application Overview (cont.)
                       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




Present at Business Computer @Sci North
Chiang Mai                                                                                                11
12/1/2011




                     Android Application Overview (cont.)
                       Application Lifecycle
                           To free up resources, processes are being killed based on their
                           priority:
                              Critical Priority: foreground (active) processes
                                 Foreground activities; components that execute an onReceive event
                                 handler; services that are executing an onStart, onCreate, or
                                 onDestroy event handler.
                              High Priority: visible (inactive) processes and started service
                              processes
                                 Partially obscured activity (lost focus); services started.
                              Low Priority: background processes
                                 Activities that are not visible; activities with no started service




                    Application Components and Lifecycle (cont.)
                       Activity Lifecycle:
                           Activities are managed as an activity stack (LIFO collection)
                           Activity has four states:
                              Running: activity is in the foreground
                              Paused: activity has lost focus but it is still visible
                              Stopped: activity is not visible (completely obscured by another
                              activity)
                              Inactive: activity has not been launched yet or has been killed.




Present at Business Computer @Sci North
Chiang Mai                                                                                                   12
12/1/2011




                    Application Components and Lifecycle (cont.)




                     Source: http://code.google.com/android/reference/android/app/Activity.html#ActivityLifecycle




                   Activity Lifecycle
                        public class Activity extends ApplicationContext {
                       // full lifetime
                       protected void onCreate(BundlesavedInstanceState);

                       // visible lifetime
                            protected void onStart();
                            protected void onRestart();

                             // active lifetime
                             protected void onResume();
                             protected void onPause();
                             protected void onStop();
                             protected void onDestroy();
                       }




Present at Business Computer @Sci North
Chiang Mai                                                                                                                13
12/1/2011




                                     IntentReceivers
                          Components that respond to broadcast ‘Intents’

                          Way to respond to external notification or alarms

                          Apps can invent and broadcast their own Intent




                                             Intents
                          Think of Intents as a verb and object; a description of
                          what you want done
                             E.g. VIEW, CALL, PLAY etc..

                          System matches Intent with Activity that can best
                          provide the service

                          Activities and IntentReceivers describe what Intents
                          they can service




Present at Business Computer @Sci North
Chiang Mai                                                                                14
12/1/2011




                                                Intents
                    Home

                                                                              Picasa
                                                                            Photo Gallery
                   Contacts

                                     “Pick photo”
                    GMail

                                            Client component makes a
                     Chat                    System picks best component
                                            request for a specific action
                                             New components can use
                                             for that action
                    Blogger
                    Blogger
                                             existing functionality




                                               Services
                              Faceless components that run in the background
                                 E.g. music player, network download etc…




Present at Business Computer @Sci North
Chiang Mai                                                                                        15
12/1/2011




                                   ContentProviders
                          Enables sharing of data across applications
                              E.g. address book, photo gallery

                          Provides uniform APIs for:
                              querying
                              delete, update and insert.

                          Content is represented by URI and MIME type




                   Fundamental Coding Concepts
                      interface vs. processing
                        separation is key!!!
                        android app interface: res files
                         ○ layout *.xml to define views
                         ○ values *.xml to define strings, menus
                         ○ drawable *.png to define images
                        android app processing: src *.java
                      event based programming
                        javascript example?




Present at Business Computer @Sci North
Chiang Mai                                                                    16
12/1/2011




                                  Application Manifest
                             master .xml file
                             declares all the components of the application
                             declares intent filters for each component
                             declares external app info: name, icon, version,
                             SDK levels, permissions, required configurations
                             and device features, etc.
                             http://developer.android.com/guide/topics/manif
                             est/manifest-intro.html


                  Day 4




                           Creating a New Application I
                    Create Project
                          File -> New -> Project -> Android -> Android
                          Project
                          New Project Wizard to specify
                             project name – file folder
                             check/change location
                             choose lowest level build target
                             application name – friendly description
                             package name – 2 part java namespace
                             create activity – main activity component
                             min SDK – lowest level that app will run on

                  Day 4




Present at Business Computer @Sci North
Chiang Mai                                                                            17
12/1/2011




                          Creating a New Application II
                          Create Launch Configuration



                             project and activity to launch

                             virtual device and emulator options

                             input/output settings




                  Day 4




                         Creating a New Application
                    Run, Edit, Debug
                                     III
                          debug & run default Hello World activity
                             cmd-shift-O to import necessary classes in Eclipse
                             select project, right click, Android Tools -> Fix
                             Project Properties
                          edit the starting activity
                          implement new components and behaviors
                          (borrow from samples)
                          select the project and then
                          Run -> Run As -> Android Application

                  Day 4




Present at Business Computer @Sci North
Chiang Mai                                                                              18
12/1/2011




                                            User Interfaces
                    GOOD                                 BAD

                          intuitive                          overcrowding

                          clean                              too complicated

                          simple                             poor aesthetics

                          elegant                            lack of response, feedback

                          right level of information         pop-ups

                          fast                               physically unwieldy



                  Day 1




                                      HCI, UX, UI, oh my!
                                 HCI: human computer interaction

                                 UI: User Interface

                                 GUI: Graphical User Interface

                                 UX: User Experience




                  Day 1




Present at Business Computer @Sci North
Chiang Mai                                                                                      19
12/1/2011




                                          Reference
                          http://developer.android.com

                          http://sites.google.com/site/io

                          http://www.github.com




Present at Business Computer @Sci North
Chiang Mai                                                        20
Ad

More Related Content

What's hot (19)

Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7
Thomas Robbins
 
iPad Apps for the Enterprise
iPad Apps for the EnterpriseiPad Apps for the Enterprise
iPad Apps for the Enterprise
Sukumar Jena
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
SenthilKumar Selvaraj
 
Programr overview2
Programr overview2Programr overview2
Programr overview2
_programr
 
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and ValidationMeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
Intel Developer Zone Community
 
Enterprise Flex applications on tablet devices
Enterprise Flex applications on tablet devicesEnterprise Flex applications on tablet devices
Enterprise Flex applications on tablet devices
Michael Chaize
 
Luis Martins
Luis MartinsLuis Martins
Luis Martins
joaogoncalves
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
Marko Gargenta
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
Marko Gargenta
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressions
Shafaq Abdullah
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Appnovation Technologies
 
Kony Mobile Management
Kony Mobile ManagementKony Mobile Management
Kony Mobile Management
Dipesh Mukerji
 
Multichannel User Interfaces
Multichannel User InterfacesMultichannel User Interfaces
Multichannel User Interfaces
Pedro J. Molina
 
Codestrong 2012 breakout session the role of cloud services in your next ge...
Codestrong 2012 breakout session   the role of cloud services in your next ge...Codestrong 2012 breakout session   the role of cloud services in your next ge...
Codestrong 2012 breakout session the role of cloud services in your next ge...
Axway Appcelerator
 
Android application development
Android application developmentAndroid application development
Android application development
Fahad A. Shaikh
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
Andrew Ferrier
 
Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191
umeshchavan
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
GoogleTecTalks
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...
LetsConnect
 
Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7Creating Mobile Websites with Kentico CMS 7
Creating Mobile Websites with Kentico CMS 7
Thomas Robbins
 
iPad Apps for the Enterprise
iPad Apps for the EnterpriseiPad Apps for the Enterprise
iPad Apps for the Enterprise
Sukumar Jena
 
Programr overview2
Programr overview2Programr overview2
Programr overview2
_programr
 
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and ValidationMeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
Intel Developer Zone Community
 
Enterprise Flex applications on tablet devices
Enterprise Flex applications on tablet devicesEnterprise Flex applications on tablet devices
Enterprise Flex applications on tablet devices
Michael Chaize
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
Marko Gargenta
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressions
Shafaq Abdullah
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Appnovation Technologies
 
Kony Mobile Management
Kony Mobile ManagementKony Mobile Management
Kony Mobile Management
Dipesh Mukerji
 
Multichannel User Interfaces
Multichannel User InterfacesMultichannel User Interfaces
Multichannel User Interfaces
Pedro J. Molina
 
Codestrong 2012 breakout session the role of cloud services in your next ge...
Codestrong 2012 breakout session   the role of cloud services in your next ge...Codestrong 2012 breakout session   the role of cloud services in your next ge...
Codestrong 2012 breakout session the role of cloud services in your next ge...
Axway Appcelerator
 
Android application development
Android application developmentAndroid application development
Android application development
Fahad A. Shaikh
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
Andrew Ferrier
 
Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191
umeshchavan
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
GoogleTecTalks
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...
LetsConnect
 

Viewers also liked (8)

040103 Slide-01
040103 Slide-01040103 Slide-01
040103 Slide-01
Naret Su
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэнд
naraa_onji
 
Presentación1
Presentación1Presentación1
Presentación1
Encarna MesaBetancor
 
Inspiration slides
Inspiration slidesInspiration slides
Inspiration slides
Oliver Thompson
 
Slide day2-1
Slide day2-1Slide day2-1
Slide day2-1
Naret Su
 
Slide day5-1
Slide day5-1Slide day5-1
Slide day5-1
Naret Su
 
Modelo examen certificado camara comercio madrid superior negocios
Modelo examen certificado camara comercio madrid superior negociosModelo examen certificado camara comercio madrid superior negocios
Modelo examen certificado camara comercio madrid superior negocios
Encarna MesaBetancor
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэнд
naraa_onji
 
040103 Slide-01
040103 Slide-01040103 Slide-01
040103 Slide-01
Naret Su
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэнд
naraa_onji
 
Slide day2-1
Slide day2-1Slide day2-1
Slide day2-1
Naret Su
 
Slide day5-1
Slide day5-1Slide day5-1
Slide day5-1
Naret Su
 
Modelo examen certificado camara comercio madrid superior negocios
Modelo examen certificado camara comercio madrid superior negociosModelo examen certificado camara comercio madrid superior negocios
Modelo examen certificado camara comercio madrid superior negocios
Encarna MesaBetancor
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэнд
naraa_onji
 
Ad

Similar to Introduction of android (20)

Introduction to android
Introduction to androidIntroduction to android
Introduction to android
krishnastudent88
 
2011 android
2011 android2011 android
2011 android
vpedapolu
 
Android ppt
Android pptAndroid ppt
Android ppt
Pooja Garg
 
Android : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesAndroid : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile Devices
Ritesh Puthran
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
Shumaila Khan
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic Guide
AKASH SINGH
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
Ganesh Waghmare
 
Drupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_print
DrupalcampAtlanta2012
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
Mike Desjardins
 
All about android
All about androidAll about android
All about android
Inimitable Harish
 
Getting Started with Android 1.5
Getting Started with Android 1.5Getting Started with Android 1.5
Getting Started with Android 1.5
Gaurav Kohli
 
Android Overview
Android OverviewAndroid Overview
Android Overview
Publicis Sapient Engineering
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
NitinMehra2205
 
Cross compiling android applications
Cross compiling android applicationsCross compiling android applications
Cross compiling android applications
sai krishna
 
Android platform
Android platform Android platform
Android platform
Rashmi Warghade
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, android
Jehad2012
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
Dennise Layague
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridapps
strider1981
 
mobile application development mobile application development
mobile application development mobile application developmentmobile application development mobile application development
mobile application development mobile application development
Kamrankhan925215
 
Top Technologies to Develop Mobile Apps.pptx
Top Technologies to Develop Mobile Apps.pptxTop Technologies to Develop Mobile Apps.pptx
Top Technologies to Develop Mobile Apps.pptx
GokulKanna18
 
2011 android
2011 android2011 android
2011 android
vpedapolu
 
Android : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesAndroid : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile Devices
Ritesh Puthran
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
Shumaila Khan
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic Guide
AKASH SINGH
 
Drupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_print
DrupalcampAtlanta2012
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
Mike Desjardins
 
Getting Started with Android 1.5
Getting Started with Android 1.5Getting Started with Android 1.5
Getting Started with Android 1.5
Gaurav Kohli
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
NitinMehra2205
 
Cross compiling android applications
Cross compiling android applicationsCross compiling android applications
Cross compiling android applications
sai krishna
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, android
Jehad2012
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
Dennise Layague
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridapps
strider1981
 
mobile application development mobile application development
mobile application development mobile application developmentmobile application development mobile application development
mobile application development mobile application development
Kamrankhan925215
 
Top Technologies to Develop Mobile Apps.pptx
Top Technologies to Develop Mobile Apps.pptxTop Technologies to Develop Mobile Apps.pptx
Top Technologies to Develop Mobile Apps.pptx
GokulKanna18
 
Ad

More from Naret Su (16)

Unit1 introduction
Unit1 introductionUnit1 introduction
Unit1 introduction
Naret Su
 
Ch03 handout
Ch03 handoutCh03 handout
Ch03 handout
Naret Su
 
Ch02 handout
Ch02 handoutCh02 handout
Ch02 handout
Naret Su
 
51-307 Unit 1
51-307 Unit 151-307 Unit 1
51-307 Unit 1
Naret Su
 
Cs51-307-1-55
Cs51-307-1-55Cs51-307-1-55
Cs51-307-1-55
Naret Su
 
แนะนำรายวิชา 04-103
แนะนำรายวิชา 04-103แนะนำรายวิชา 04-103
แนะนำรายวิชา 04-103
Naret Su
 
Ex computer-spec
Ex computer-specEx computer-spec
Ex computer-spec
Naret Su
 
Semi tor
Semi torSemi tor
Semi tor
Naret Su
 
Slide day4-1
Slide day4-1Slide day4-1
Slide day4-1
Naret Su
 
Slide day3-1
Slide day3-1Slide day3-1
Slide day3-1
Naret Su
 
Pre 310-2-54-1
Pre 310-2-54-1Pre 310-2-54-1
Pre 310-2-54-1
Naret Su
 
Pretest 308-2-54-1
Pretest 308-2-54-1Pretest 308-2-54-1
Pretest 308-2-54-1
Naret Su
 
Job03 unit2-2
Job03 unit2-2Job03 unit2-2
Job03 unit2-2
Naret Su
 
Job02 unit2-2
Job02 unit2-2Job02 unit2-2
Job02 unit2-2
Naret Su
 
Job unit2-2
Job unit2-2Job unit2-2
Job unit2-2
Naret Su
 
Unit1 introduction
Unit1 introductionUnit1 introduction
Unit1 introduction
Naret Su
 
Ch03 handout
Ch03 handoutCh03 handout
Ch03 handout
Naret Su
 
Ch02 handout
Ch02 handoutCh02 handout
Ch02 handout
Naret Su
 
51-307 Unit 1
51-307 Unit 151-307 Unit 1
51-307 Unit 1
Naret Su
 
Cs51-307-1-55
Cs51-307-1-55Cs51-307-1-55
Cs51-307-1-55
Naret Su
 
แนะนำรายวิชา 04-103
แนะนำรายวิชา 04-103แนะนำรายวิชา 04-103
แนะนำรายวิชา 04-103
Naret Su
 
Ex computer-spec
Ex computer-specEx computer-spec
Ex computer-spec
Naret Su
 
Slide day4-1
Slide day4-1Slide day4-1
Slide day4-1
Naret Su
 
Slide day3-1
Slide day3-1Slide day3-1
Slide day3-1
Naret Su
 
Pre 310-2-54-1
Pre 310-2-54-1Pre 310-2-54-1
Pre 310-2-54-1
Naret Su
 
Pretest 308-2-54-1
Pretest 308-2-54-1Pretest 308-2-54-1
Pretest 308-2-54-1
Naret Su
 
Job03 unit2-2
Job03 unit2-2Job03 unit2-2
Job03 unit2-2
Naret Su
 
Job02 unit2-2
Job02 unit2-2Job02 unit2-2
Job02 unit2-2
Naret Su
 
Job unit2-2
Job unit2-2Job unit2-2
Job unit2-2
Naret Su
 

Recently uploaded (20)

"Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules""Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules"
rupalinirmalbpharm
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdfAPM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
Association for Project Management
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
National Information Standards Organization (NISO)
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 
"Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules""Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules"
rupalinirmalbpharm
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 

Introduction of android

  • 1. 12/1/2011 Mobile Application Development with ANDROID Piya Sankhati ( Jenk ) Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building blocks Development tools Hello Android Resources Present at Business Computer @Sci North Chiang Mai 1
  • 2. 12/1/2011 Mobile Applications Mobile Apps are apps or services that can be pushed to a mobile device or downloaded and installed locally. Classification • Browser-based: apps/services developed in a markup language • Native: compiled applications (device has a runtime environment). Interactive apps such as downloadable games. • Hybrid: the best of both worlds (a browser is needed for discovery) What is Android Android is an open source operating system, created by Google specifically for use on mobile devices (cell phones and tablets) Linux based (2.6 kernel) Can be programmed in C/C++ but most app development is done in Java (Java access to C Libraries via JNI (Java Native Interface)) Supports Bluetooth, Wi-Fi, and 3G and 4G networking Present at Business Computer @Sci North Chiang Mai 2
  • 3. 12/1/2011 Why Android? Open source Lots of samples Popular Free to develop JAVA based Easily shared The Android Software Stack Present at Business Computer @Sci North Chiang Mai 3
  • 4. 12/1/2011 Linux Kernel • Works as a HAL • Device drivers • Memory management • Process management • Networking Libraries • C/C++ libraries • Interface through Java • Surface manager – Handling UI Windows • 2D and 3D graphics • Media codecs, SQLite, Browser engine Present at Business Computer @Sci North Chiang Mai 4
  • 5. 12/1/2011 Android Runtime • Dalvik VM – Dex files – Compact and efficient than class files – Limited memory and battery power • Core Libraries – Java 5 Std edition – Collections, I/O etc… Application Framework • API interface • Activity manager – manages application life cycle. Present at Business Computer @Sci North Chiang Mai 5
  • 6. 12/1/2011 Applications • Built in and user apps • Can replace built in apps Android Application Development Android Eclipse IDE SDK Android Android Mobile Emulator Device Present at Business Computer @Sci North Chiang Mai 6
  • 7. 12/1/2011 Android development Java Source Android Manifest Generated Java .dex Dalvik Class Compiler File VM Resource XML Android Libraries Android Application Types Foreground applications need cool UIs (sudoku) Background services & intent receivers little to no user input (back-up assistant) Intermittent applications combination of visible & invisible (music) Widgets dynamic data displays (date/time) Present at Business Computer @Sci North Chiang Mai 7
  • 8. 12/1/2011 Foreground applications Background Service Present at Business Computer @Sci North Chiang Mai 8
  • 9. 12/1/2011 Intermittent applications Home Screen Widget Present at Business Computer @Sci North Chiang Mai 9
  • 10. 12/1/2011 Pre-installRequirements JDK 5 or JDK 6 (JAVA DevelopementKit) http://www.oracle.com/technetwork/java/javase/downloads/in dex.html Eclipse 3.3 orlater http://www.eclipse.org/downloads/ ADT Plugin for Eclipse http://developer.android.com/sdk/eclipse-adt.html Android SDK http://developer.android.com/sdk/index.html EmulatororAndroiddevice Introduction (cont.) Design Considerations: Low processing speed Optimize code to run quick and efficiently Limited storage and memory Minimize size of applications; reuse and share data Limited bandwidth and high latency Design your application to be responsive to a slow (sometimes non- existent), intermittent network connection Limited battery life Avoid expensive operations Low resolution, small screen size “Compress” the data you want to display Present at Business Computer @Sci North Chiang Mai 10
  • 11. 12/1/2011 Application Components and Lifecycle 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 Android Application Overview (cont.) 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 Present at Business Computer @Sci North Chiang Mai 11
  • 12. 12/1/2011 Android Application Overview (cont.) Application Lifecycle To free up resources, processes are being killed based on their priority: Critical Priority: foreground (active) processes Foreground activities; components that execute an onReceive event handler; services that are executing an onStart, onCreate, or onDestroy event handler. High Priority: visible (inactive) processes and started service processes Partially obscured activity (lost focus); services started. Low Priority: background processes Activities that are not visible; activities with no started service Application Components and Lifecycle (cont.) Activity Lifecycle: Activities are managed as an activity stack (LIFO collection) Activity has four states: Running: activity is in the foreground Paused: activity has lost focus but it is still visible Stopped: activity is not visible (completely obscured by another activity) Inactive: activity has not been launched yet or has been killed. Present at Business Computer @Sci North Chiang Mai 12
  • 13. 12/1/2011 Application Components and Lifecycle (cont.) Source: http://code.google.com/android/reference/android/app/Activity.html#ActivityLifecycle Activity Lifecycle public class Activity extends ApplicationContext { // full lifetime protected void onCreate(BundlesavedInstanceState); // visible lifetime protected void onStart(); protected void onRestart(); // active lifetime protected void onResume(); protected void onPause(); protected void onStop(); protected void onDestroy(); } Present at Business Computer @Sci North Chiang Mai 13
  • 14. 12/1/2011 IntentReceivers Components that respond to broadcast ‘Intents’ Way to respond to external notification or alarms Apps can invent and broadcast their own Intent Intents Think of Intents as a verb and object; a description of what you want done E.g. VIEW, CALL, PLAY etc.. System matches Intent with Activity that can best provide the service Activities and IntentReceivers describe what Intents they can service Present at Business Computer @Sci North Chiang Mai 14
  • 15. 12/1/2011 Intents Home Picasa Photo Gallery Contacts “Pick photo” GMail Client component makes a Chat System picks best component request for a specific action New components can use for that action Blogger Blogger existing functionality Services Faceless components that run in the background E.g. music player, network download etc… Present at Business Computer @Sci North Chiang Mai 15
  • 16. 12/1/2011 ContentProviders Enables sharing of data across applications E.g. address book, photo gallery Provides uniform APIs for: querying delete, update and insert. Content is represented by URI and MIME type Fundamental Coding Concepts interface vs. processing separation is key!!! android app interface: res files ○ layout *.xml to define views ○ values *.xml to define strings, menus ○ drawable *.png to define images android app processing: src *.java event based programming javascript example? Present at Business Computer @Sci North Chiang Mai 16
  • 17. 12/1/2011 Application Manifest master .xml file declares all the components of the application declares intent filters for each component declares external app info: name, icon, version, SDK levels, permissions, required configurations and device features, etc. http://developer.android.com/guide/topics/manif est/manifest-intro.html Day 4 Creating a New Application I Create Project File -> New -> Project -> Android -> Android Project New Project Wizard to specify project name – file folder check/change location choose lowest level build target application name – friendly description package name – 2 part java namespace create activity – main activity component min SDK – lowest level that app will run on Day 4 Present at Business Computer @Sci North Chiang Mai 17
  • 18. 12/1/2011 Creating a New Application II Create Launch Configuration project and activity to launch virtual device and emulator options input/output settings Day 4 Creating a New Application Run, Edit, Debug III debug & run default Hello World activity cmd-shift-O to import necessary classes in Eclipse select project, right click, Android Tools -> Fix Project Properties edit the starting activity implement new components and behaviors (borrow from samples) select the project and then Run -> Run As -> Android Application Day 4 Present at Business Computer @Sci North Chiang Mai 18
  • 19. 12/1/2011 User Interfaces GOOD BAD intuitive overcrowding clean too complicated simple poor aesthetics elegant lack of response, feedback right level of information pop-ups fast physically unwieldy Day 1 HCI, UX, UI, oh my! HCI: human computer interaction UI: User Interface GUI: Graphical User Interface UX: User Experience Day 1 Present at Business Computer @Sci North Chiang Mai 19
  • 20. 12/1/2011 Reference http://developer.android.com http://sites.google.com/site/io http://www.github.com Present at Business Computer @Sci North Chiang Mai 20