SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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 7Thomas Robbins
 
iPad Apps for the Enterprise
iPad Apps for the EnterpriseiPad Apps for the Enterprise
iPad Apps for the EnterpriseSukumar 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 ValidationIntel 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 devicesMichael Chaize
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java DevelopersMarko Gargenta
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressionsShafaq 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 ApplicationAppnovation Technologies
 
Kony Mobile Management
Kony Mobile ManagementKony Mobile Management
Kony Mobile ManagementDipesh Mukerji
 
Multichannel User Interfaces
Multichannel User InterfacesMultichannel User Interfaces
Multichannel User InterfacesPedro 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 developmentFahad A. Shaikh
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo MobileAndrew Ferrier
 
Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191umeshchavan
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To AndroidGoogleTecTalks
 
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
 

Was ist angesagt? (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
 
iPad Apps for the Enterprise
iPad Apps for the EnterpriseiPad Apps for the Enterprise
iPad Apps for the Enterprise
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Programr overview2
Programr overview2Programr overview2
Programr overview2
 
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
 
Enterprise Flex applications on tablet devices
Enterprise Flex applications on tablet devicesEnterprise Flex applications on tablet devices
Enterprise Flex applications on tablet devices
 
Luis Martins
Luis MartinsLuis Martins
Luis Martins
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Mobile trends and impressions
Mobile trends and impressionsMobile trends and impressions
Mobile trends and impressions
 
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
 
Kony Mobile Management
Kony Mobile ManagementKony Mobile Management
Kony Mobile Management
 
Multichannel User Interfaces
Multichannel User InterfacesMultichannel User Interfaces
Multichannel User Interfaces
 
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...
 
Android application development
Android application developmentAndroid application development
Android application development
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
 
Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191Camo Tech (Apr 2010)V191
Camo Tech (Apr 2010)V191
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
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...
 

Andere mochten auch

040103 Slide-01
040103 Slide-01040103 Slide-01
040103 Slide-01Naret Su
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэндnaraa_onji
 
Slide day2-1
Slide day2-1Slide day2-1
Slide day2-1Naret Su
 
Slide day5-1
Slide day5-1Slide day5-1
Slide day5-1Naret 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 negociosEncarna MesaBetancor
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэндnaraa_onji
 

Andere mochten auch (8)

040103 Slide-01
040103 Slide-01040103 Slide-01
040103 Slide-01
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэнд
 
Presentación1
Presentación1Presentación1
Presentación1
 
Inspiration slides
Inspiration slidesInspiration slides
Inspiration slides
 
Slide day2-1
Slide day2-1Slide day2-1
Slide day2-1
 
Slide day5-1
Slide day5-1Slide day5-1
Slide day5-1
 
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
 
эрүүл мэнд
эрүүл мэндэрүүл мэнд
эрүүл мэнд
 

Ähnlich wie Introduction of android

2011 android
2011 android2011 android
2011 androidvpedapolu
 
Android : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesAndroid : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesRitesh Puthran
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidShumaila Khan
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic GuideAKASH SINGH
 
Drupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcampAtlanta2012
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The BasicsMike Desjardins
 
Getting Started with Android 1.5
Getting Started with Android 1.5Getting Started with Android 1.5
Getting Started with Android 1.5Gaurav Kohli
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to AndroidNitinMehra2205
 
Cross compiling android applications
Cross compiling android applicationsCross compiling android applications
Cross compiling android applicationssai krishna
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, androidJehad2012
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phonesDennise Layague
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridappsstrider1981
 
mobile application development mobile application development
mobile application development mobile application developmentmobile application development mobile application development
mobile application development mobile application developmentKamrankhan925215
 

Ähnlich wie Introduction of android (20)

Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
2011 android
2011 android2011 android
2011 android
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile DevicesAndroid : Revolutionizing Mobile Devices
Android : Revolutionizing Mobile Devices
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android complete basic Guide
Android complete basic GuideAndroid complete basic Guide
Android complete basic Guide
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
 
Drupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_printDrupalcamp armedia phonegap_oct2012_print
Drupalcamp armedia phonegap_oct2012_print
 
Android the future
Android  the futureAndroid  the future
Android the future
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
 
All about android
All about androidAll about android
All about android
 
Getting Started with Android 1.5
Getting Started with Android 1.5Getting Started with Android 1.5
Getting Started with Android 1.5
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
Cross compiling android applications
Cross compiling android applicationsCross compiling android applications
Cross compiling android applications
 
Android platform
Android platform Android platform
Android platform
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, android
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
 
Midweek breather hybridapps
Midweek breather hybridappsMidweek breather hybridapps
Midweek breather hybridapps
 
mobile application development mobile application development
mobile application development mobile application developmentmobile application development mobile application development
mobile application development mobile application development
 

Mehr von Naret Su

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

Mehr von Naret Su (16)

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

Kürzlich hochgeladen

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Kürzlich hochgeladen (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

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