Slide 1

Slide 1 text

Android Code lab Paresh Mayani

Slide 2

Slide 2 text

Who am I? :D Android & WP7 Developer @Digicorp Head, GDG Ahmedabad @pareshmayani www.TechnoTalkative.com

Slide 3

Slide 3 text

What is Android? Why Android? Where Android?

Slide 4

Slide 4 text

Why Android? 1.3 Million Android Device Activations Per Day

Slide 5

Slide 5 text

Why Android? 400 Million Total Android device Activated http://goo.gl/1f45r

Slide 6

Slide 6 text

Why Android? 68.1% Android Market Share world wide – Q3 2012 http://www.huffingtonpost.com/2012/09/18/android-market-share-q3-2012_n_1893292.html

Slide 7

Slide 7 text

Why Android? • We love and trust Google • Open Source • Larger screen size (iPhone is Fixed size :D ) • Google Play Store • Various Manufacturers

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Where Android?

Slide 10

Slide 10 text

Where Android?

Slide 11

Slide 11 text

Where Android?

Slide 12

Slide 12 text

Where Android? http://goo.gl/s98Du Project Glass:

Slide 13

Slide 13 text

Building blocks of Android App Activities Views Services Content Providers Notifications Intents

Slide 14

Slide 14 text

Building blocks of Android App Activities Views Services Content Providers Notifications Intents

Slide 15

Slide 15 text

Activities • Fundamental object of android app with lifecycle • Having UI • Interact with the user • One app can have Multiple activities • Must have 1 Main Activity

Slide 16

Slide 16 text

Building blocks of Android App Activities Views Services Content Providers Notifications Intents

Slide 17

Slide 17 text

Views • Basic building block for UI components • Draws itself to the screen • Respond to Events

Slide 18

Slide 18 text

Building blocks of Android App Activities Views Services Content Providers Notifications Intents

Slide 19

Slide 19 text

Intents • A simple message object that represents an "intention" to do something • Most significant use => launching of activities, where it can be thought of as the glue between activities.

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Building blocks of Android App Activities Views Services Content Providers Notifications Intents

Slide 22

Slide 22 text

Services • can perform long-running operations in the background • Doesn’t Provide User Interface (UI) • Another application component can start a service and it will continue to run in the background even if the user switches to another application.

Slide 23

Slide 23 text

Building blocks of Android App Activities Views Services Content Providers Notifications Intents

Slide 24

Slide 24 text

Content Providers • presents data to external applications • provide a level of abstraction for any data stored on the device that is accessible by multiple applications.

Slide 25

Slide 25 text

Android application - 3 Activity 3.1 Android application - 2 Activity 2.1 Activity 2.1 Android application - 1 Activity 1.1 Activity 1.2 Activity 1.3 Content Provider - A XML Data File SQLite Remote

Slide 26

Slide 26 text

Building blocks of Android App Activities Views Services Content Providers Notifications Intents

Slide 27

Slide 27 text

Notifications • A Notification is a small icon that appears in the status bar. • Users can interact with this icon to receive information • For example: New SMS message, Missed call, New Mail

Slide 28

Slide 28 text

How to Install Android? 1. Download and setup the Eclipse IDE http://eclipse.org/downloads/ 2. Download JDK & Install http://www.oracle.com/technetwork/java/javase/downloads/index.html 3. Download the Android SDK starter package http://developer.android.com/sdk/index.html 4. Android Development Tools (ADT) plug-in , download from within eclipse https://dl-ssl.google.com/android/eclipse/

Slide 29

Slide 29 text

How to Install Android? Download the SDK ADT Bundle for Windows • ADT (Android Developer Tools) Bundle • With a single download, the ADT Bundle includes everything you need to begin developing apps: – Eclipse + ADT plug-in – Android SDK Tools – Android Platform-tools – The latest Android platform – The latest Android system image for the emulator

Slide 30

Slide 30 text

Android Development Environment

Slide 31

Slide 31 text

Eclipse IDE Package Structure of your Android app Source Code Problems/Erros and Console messages Program Elements

Slide 32

Slide 32 text

Eclipse UI Editor UI Elements UI View area

Slide 33

Slide 33 text

Where to execute Android programs? - Emulator or Real Device

Slide 34

Slide 34 text

Android Virtual Device Manager

Slide 35

Slide 35 text

Android Virtual Device Manager

Slide 36

Slide 36 text

Let’s create New AVD

Slide 37

Slide 37 text

Android project structure

Slide 38

Slide 38 text

Types of Layout Linear Layout Relative Layout Frame Layout Table Layout GridLayout

Slide 39

Slide 39 text

Types of Widgets

Slide 40

Slide 40 text

• Used to show captions or string values TextView

Slide 41

Slide 41 text

Button • It used to execute some task based on the button’s click/selection action.

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

EditText • Used to accept some inputs from the user.

Slide 44

Slide 44 text

ImageView • Used to display image resources like logo, icon, etc.

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

CheckBox • It’s for the selection of items.

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

RadioButton • Its a two-states button that can be either checked or unchecked.

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Get in Touch twitter.com/pareshmayani fb.com/GDGAhmedabad http://gplus.to/GDGAhmedabad www.TechnoTalkative.com gplus.to/paresh.mayani