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

More Related Content

PDF
Collaborative and agile development of mobile applications
PDF
Octopod Mobile Development Platform for rapid cross-platform Enterprise IT Mo...
PPTX
Mobile and IBM Worklight Best Practices
PPTX
Kony plaform short
PDF
Microsoft Lync 2013 preview
PPTX
eXo overview Fev 2013. Introducing our new positioning.
PDF
The Future of your Desktop - Trends in Enterprise Mash-Up, Collaboration and ...
PPTX
Kony - The multi Channel Challenge
Collaborative and agile development of mobile applications
Octopod Mobile Development Platform for rapid cross-platform Enterprise IT Mo...
Mobile and IBM Worklight Best Practices
Kony plaform short
Microsoft Lync 2013 preview
eXo overview Fev 2013. Introducing our new positioning.
The Future of your Desktop - Trends in Enterprise Mash-Up, Collaboration and ...
Kony - The multi Channel Challenge

What's hot (19)

PPTX
Creating Mobile Websites with Kentico CMS 7
PDF
iPad Apps for the Enterprise
PPTX
Android quick talk
PDF
Programr overview2
PDF
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
PDF
Enterprise Flex applications on tablet devices
PDF
Luis Martins
PDF
Android for Java Developers
PDF
Android Deep Dive
PDF
Mobile trends and impressions
PDF
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
PPTX
Kony Mobile Management
PDF
Multichannel User Interfaces
PPTX
Codestrong 2012 breakout session the role of cloud services in your next ge...
PPTX
Android application development
KEY
Real-world Dojo Mobile
PDF
Camo Tech (Apr 2010)V191
PDF
An Introduction To Android
PDF
Philipe Riand - Building Social Applications using the Social Business Toolki...
Creating Mobile Websites with Kentico CMS 7
iPad Apps for the Enterprise
Android quick talk
Programr overview2
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
Enterprise Flex applications on tablet devices
Luis Martins
Android for Java Developers
Android Deep Dive
Mobile trends and impressions
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Kony Mobile Management
Multichannel User Interfaces
Codestrong 2012 breakout session the role of cloud services in your next ge...
Android application development
Real-world Dojo Mobile
Camo Tech (Apr 2010)V191
An Introduction To Android
Philipe Riand - Building Social Applications using the Social Business Toolki...
Ad

Viewers also liked (8)

PDF
040103 Slide-01
PDF
эрүүл мэнд
PPTX
Presentación1
PPTX
Inspiration slides
PDF
Slide day2-1
PDF
Slide day5-1
PDF
Modelo examen certificado camara comercio madrid superior negocios
PDF
эрүүл мэнд
040103 Slide-01
эрүүл мэнд
Presentación1
Inspiration slides
Slide day2-1
Slide day5-1
Modelo examen certificado camara comercio madrid superior negocios
эрүүл мэнд
Ad

Similar to Introduction of android (20)

PDF
Introduction to android
PPT
2011 android
PPTX
Android ppt
PDF
Android : Revolutionizing Mobile Devices
PPTX
Introduction to android
PDF
Android complete basic Guide
PPT
Android My Seminar
PDF
Drupalcamp armedia phonegap_oct2012_print
KEY
Android Development: The Basics
PPTX
All about android
PPT
Getting Started with Android 1.5
PPT
PPTX
Introduction to Android
PPTX
Cross compiling android applications
PPTX
Android platform
PDF
Ch1 hello, android
PPTX
Android and android phones
PPTX
Midweek breather hybridapps
PPTX
mobile application development mobile application development
PPTX
Top Technologies to Develop Mobile Apps.pptx
Introduction to android
2011 android
Android ppt
Android : Revolutionizing Mobile Devices
Introduction to android
Android complete basic Guide
Android My Seminar
Drupalcamp armedia phonegap_oct2012_print
Android Development: The Basics
All about android
Getting Started with Android 1.5
Introduction to Android
Cross compiling android applications
Android platform
Ch1 hello, android
Android and android phones
Midweek breather hybridapps
mobile application development mobile application development
Top Technologies to Develop Mobile Apps.pptx

More from Naret Su (16)

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

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Insiders guide to clinical Medicine.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
master seminar digital applications in india
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Structure & Organelles in detailed.
Complications of Minimal Access Surgery at WLH
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
O7-L3 Supply Chain Operations - ICLT Program
Insiders guide to clinical Medicine.pdf
PPH.pptx obstetrics and gynecology in nursing
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Cell Types and Its function , kingdom of life
Abdominal Access Techniques with Prof. Dr. R K Mishra
Module 4: Burden of Disease Tutorial Slides S2 2025
STATICS OF THE RIGID BODIES Hibbelers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Final Presentation General Medicine 03-08-2024.pptx
master seminar digital applications in india
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Structure & Organelles in detailed.

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