Slide 1

Slide 1 text

ANDROID APP DEV CRASH COURSE SOHAM MONDAL Soham  Mondal  

Slide 2

Slide 2 text

Soham  Mondal   WWW .BLRDROID.ORG

Slide 3

Slide 3 text

WHY ANDROID? SOME GLOBAL NUMBERS Soham  Mondal  

Slide 4

Slide 4 text

500,000,000 ANDROID  DEVICES  GLOBALLY   h8p://ar=cles.=mesofindia.india=mes.com/2012-­‐06-­‐28/telecom/32456734_1_android-­‐devices-­‐hugo-­‐barra-­‐smartphone-­‐market   Soham  Mondal  

Slide 5

Slide 5 text

1,000,000+   ANDROID  HANDSET  ACTIVATIONS  PER  DAY   h8p://ar=cles.=mesofindia.india=mes.com/2012-­‐06-­‐28/telecom/32456734_1_android-­‐devices-­‐hugo-­‐barra-­‐smartphone-­‐market   Soham  Mondal  

Slide 6

Slide 6 text

Soham  Mondal   ANDROID ON GOOGLE TV The  same  android  codebase  can  run  on  android  phones,   android  tablets  and  now  even  on  televisions  running   Google  TV  

Slide 7

Slide 7 text

SOME MORE HIGHLIGHTS New Cameras from Nikon and Sasmung expected to run Android, to make “intelligent” devices Android have been deployed on intelligent kiosks, cars and even household electronics devices Asus Nexus 7 tablet launched at $199 running Android 4.1 More Nexus devices expected from multiple manufacturers in October Soham  Mondal  

Slide 8

Slide 8 text

ANDROID APP BUILDING BLOCKS Soham  Mondal  

Slide 9

Slide 9 text

ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 10

Slide 10 text

ANDROID BUILDING BLOCKS Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Ac=vi=es   Soham  Mondal  

Slide 11

Slide 11 text

ACTIVITIES •  Provides a screen with which users can interact in order to do something Example: dial the phone, take a photo, send an email, or view a map. •  Each activity is given a window in which to draw its user interface. •  An app usually consists of multiple activities •  Typically, one activity in an application is specified as the "main" activity, which is presented to the user when launching the application for the first time. Soham  Mondal  

Slide 12

Slide 12 text

ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 13

Slide 13 text

Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Views   Content  providers   Services   No=fica=ons   Intents   Soham  Mondal  

Slide 14

Slide 14 text

INTENTS •  Intents are used to move from Activity to Activity •  describes what the application wants •  provides late runtime binding Soham  Mondal  

Slide 15

Slide 15 text

INTENT INTENT ACTIVITY  1   ACTIVITY  2   ACTIVITY  3   Soham  Mondal  

Slide 16

Slide 16 text

ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 17

Slide 17 text

Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents   Content  providers   Services   No=fica=ons   Views   Soham  Mondal  

Slide 18

Slide 18 text

VIEWS •  Views are UI basic building blocks •  Know how to draw themselves •  Respond to events •  Organized as trees to build up GUIs •  Described in XML in layout resources Soham  Mondal  

Slide 19

Slide 19 text

UI ELEMENTS Ac=on  Bar:  made  of  a   couple  of  ImageViews   Soham  Mondal  

Slide 20

Slide 20 text

UI ELEMENTS Individual  elements   ImageView   TextView   TextView   Soham  Mondal  

Slide 21

Slide 21 text

ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 22

Slide 22 text

Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents   Views   Services   No=fica=ons   Content  providers   Soham  Mondal  

Slide 23

Slide 23 text

CONTENT PROVIDERS •  Enable applications to store and share data. •  Makes a specific set of the application's data available to other applications. •  Date stored in the file system, in an SQLite database or on other platforms Soham  Mondal  

Slide 24

Slide 24 text

File   Ac=vity  1.1   Ac=vity  1.2   Ac=vity  2.1   Ac=vity  2.2   Applica'on  2   (wants  phone  number)   Applica'on  1  (contacts  app)   Remote   SQLite   db   Ac=vity  3.1   Ac=vity  3.2   Applica'on  3   Content  Provider   Soham  Mondal  

Slide 25

Slide 25 text

ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 26

Slide 26 text

Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents   Views   Content  providers   No=fica=ons   Services   Soham  Mondal  

Slide 27

Slide 27 text

SERVICES •  Faceless task that runs in the background. •  No visual user interface •  Runs in the background certain period of time •  For example: Background music Soham  Mondal  

Slide 28

Slide 28 text

ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 29

Slide 29 text

Ac=vi=es   ANDROID BUILDING BLOCKS Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 30

Slide 30 text

NOTIFICATIONS •  Notifies the user about events •  Sent through NotificationManager •  Types – persistent icon – sound or vibration Soham  Mondal  

Slide 31

Slide 31 text

ANDROID BUILDING BLOCKS Ac=vi=es   Android  manifest.xml   Intents   Views   Content  providers   Services   No=fica=ons   Soham  Mondal  

Slide 32

Slide 32 text

Ac=vi=es   ANDROID BUILDING BLOCKS Intents   Views   Content  providers   Services   No=fica=ons   Android  manifest.xml   Soham  Mondal  

Slide 33

Slide 33 text

ANDROID MANIFEST •  It names the Java package for the application. •  Components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. •  Permissions •  Lists the library •  And more Soham  Mondal  

Slide 34

Slide 34 text

ANDROID DEVELOPMENT ENVIRONMENT Soham  Mondal  

Slide 35

Slide 35 text

THE ECLIPSE IDE YOUR ANDROID DEVELOPMENT ENVIRONMENT Soham  Mondal  

Slide 36

Slide 36 text

Perspec=ve   Soham  Mondal  

Slide 37

Slide 37 text

Views   Edit  Area   Views   Views   Soham  Mondal  

Slide 38

Slide 38 text

              Shows  the  program  and   package  structure         Source  of  android  programs  are  shown  here   Shows  various  console  messages,  problems  etc   Outline:   Shows   various   program   elements   Soham  Mondal  

Slide 39

Slide 39 text

THE UI EDITOR Soham  Mondal  

Slide 40

Slide 40 text

Drag  and  drop   elements   Actual  UI  view   Soham  Mondal  

Slide 41

Slide 41 text

THE EMULATOR Soham  Mondal  

Slide 42

Slide 42 text

Soham  Mondal  

Slide 43

Slide 43 text

Soham  Mondal  

Slide 44

Slide 44 text

Emulator  screen   Virtual  keyboard   Menu  &  other   bu8ons   Soham  Mondal  

Slide 45

Slide 45 text

HOW TO INSTALL THE SDK Soham  Mondal  

Slide 46

Slide 46 text

HOW TO INSTALL EVERYTHING? 1.  Eclipse Download and install eclipse classic: http://www.eclipse.org/downloads/ 2.  JDK Download and install: http://www.oracle.com/technetwork /java/javase/downloads/index.html 3.  Android SDK starter package Download and install: http://developer.android.com/sdk/index.html 4.  Android development tools (ADT) plugin Download from within Eclipse: https://dl-ssl.google.com/android/eclipse/ 5.  Add platform and other optional components from within eclipse Soham  Mondal  

Slide 47

Slide 47 text

MONETIZING YOUR APP Soham  Mondal  

Slide 48

Slide 48 text

APP MONETIZATION Free – Ad supported Premium – Pay per title Trial – Upgrade to Premium Freemium – In app billing Paymium – Premium + In-app billing Trial Paymium – Trial + Paymium Subscription – Auto recurrent payment Soham  Mondal  

Slide 49

Slide 49 text

ADVERTIZING User launches your app User clicks on add in your app You get paid for each click Soham  Mondal  

Slide 50

Slide 50 text

PUBLISHING YOUR APP Soham  Mondal  

Slide 51

Slide 51 text

CHECKLIST Follow the checklist - http://developer.android.com/distribute/googleplay/publish/ preparing.html Upload your app apk at - https://play.google.com/apps/publish/ Soham  Mondal  

Slide 52

Slide 52 text

Q&A @s0h4m [email protected] Soham  Mondal