Top Banner
Welcome to ANDROID DAY ONE CLASS
30
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Andriod developer training

Welcome to ANDROID DAY ONE CLASS

Page 2: Andriod developer training

Android in a nutshell

www.kerneltraining.com/android-development

Product of OHA (Open Handset Alliance) led by Google.

Software Platform that provides a framework to develop applications for mobile devices.

It includes an OS, middleware and key applications.

Layered platform built on Linux kernel.

Page 3: Andriod developer training

Android Powered Devices

www.kerneltraining.com/android-development

Page 4: Andriod developer training

Android Features

www.kerneltraining.com/android-development

• Android’s UI includes Windows, Views, Widgets

• Android provides an integrated browser engine –Webkit

• Connectivity – Wi Fi, GPRS, Bluetooth, EDGE, 3G

• SQLite for structured data storage

• Supports GSM telephony, media, camera, compass, accelerometer (hardware dependent)

• Provides 2D and 3D graphics with OpenGL library

Page 5: Andriod developer training

Design Philosophy

www.kerneltraining.com/android-development

Small footprint

Power efficiency

Multitasking

Minimal startup time

Quick response to user activity

Support multiple screen

resolutions

Memory protection

Extensible

Page 6: Andriod developer training

Platforms Roadmap

www.kerneltraining.com/android-development

2008 1.5-Cupcake

20091.6-

Donut

2.0-Eclair

2.2-Froyo

2.3-Gingerbread3.0-Honeycomb

4.0-Icecream sandwich

4.1-Jelly bean

4.4-KitKat

Page 7: Andriod developer training

OS market share –Q3 2014

www.kerneltraining.com/android-development

Source: IDC.

Page 8: Andriod developer training

Vendor market share –Q3 2014

www.kerneltraining.com/android-development

Source: IDC.

Page 9: Andriod developer training

Statistics galore!

www.kerneltraining.com/android-development

• Smartphone market grew 27.2% year over year in 2014 Q3

• 2014 promises to close at nearly 1.3 billion shipments

• Samsung is the only top five company which had a negative change.

• Apple had its largest Q3 volume sale with the launch of iPhone 6.

• Xiaomi jumped to third position with triple-digit growth

Page 10: Andriod developer training

Building Android Apps using

www.kerneltraining.com/android-development

Page 15: Andriod developer training

www.kerneltraining.com/android-development

Project View

sign/Text Swit1 Project View

122

Design/Text Switch

3Editor View

Page 16: Andriod developer training

SDK Manager

www.kerneltraining.com/android-development

Project View

sign/Text Switch

• Used to download

Android SDK in modular

packages as and when

it is released

• Also used to download

latest contents

specifically whenever it

gets updated

Page 17: Andriod developer training

AVD Manager

www.kerneltraining.com/android-development

Project View

sign/Text Switch

• Create and manage Android Virtual Devices(AVDs)

Page 18: Andriod developer training

Android Virtual Device(AVD)

www.kerneltraining.com/android-development

Project View

sign/Text Switch

• A QEMU-based virtual mobile device

• An emulation tool used to design, debug, and test Android

applications in an Android run-time environment. The emulator

supports AVD configurations.

Emulated Device Key Keyboard Key

Home HOME

Back ESC

Call/dial button F3

Hangup/end call button F4

Search F5

Power button F7

Audio volume up button KEYPAD_PLUS, Ctrl-F5

Audio volume down button KEYPAD_MINUS, Ctrl-F6

Switch to previous layout orientation (for example, portrait, landscape)

KEYPAD_7, Ctrl-F11

Page 19: Andriod developer training

Android Project Structure

www.kerneltraining.com/android-development

Page 20: Andriod developer training

Android app - Anatomy

www.kerneltraining.com/android-development

Project View

sign/Text Switch

• java folder – contains

source files

• res – contains non-code

resources such as

images

• Gradle scripts – contains

build scripts used

internally

• Manifests – contains the

Android Manifest file

Page 21: Andriod developer training

Debugging using DDMS(Dalvik Debug Monitor Server)

www.kerneltraining.com/android-development

Project View

sign/Text Switch

Flat files

Page 22: Andriod developer training

App Development Procedure

www.kerneltraining.com/android-development

Project View

sign/Text Switch

Android API

SDK / NDK

Programming

Language

Data Handling

Flat files

Test, Sign & Package

AAPTKeytool

Publishing

GooglePlay

Page 23: Andriod developer training

Views - Introduction

www.kerneltraining.com/android-development

lGoogle

Play

Page 24: Andriod developer training

Views

www.kerneltraining.com/android-development

Project View

sign/Text Switch

Flat files

lGoogle

Play

Android provides a wide variety of UI Elements called views.

Following are some of the most commonly used views:

– Button

– TextView

– EditText

– ListView

A view can be customized by setting its properties at the time of

declaration in the layout xml file.

We can provide id to a view to be able to manipulate it using Java code.

– Checkbox

– RadioButton

– Spinner

– ImageView

Page 25: Andriod developer training

TextView

www.kerneltraining.com/android-development

Project View

sign/Text Switch

Flat files

lGoogle

Play

TextView is used as a UI component in Android to display non-

editable information in the UI.

<TextView> tag is used in the layout XML file to create a

TextView.

Some of the most important attributes for TextView are:

android:layout_width : specifies the width

android:layout_height : specifies the height

android:text : specifies the text displayed

android:id : specifies the id of the view

Page 26: Andriod developer training

TextView

www.kerneltraining.com/android-development

Project View

sign/Text Switch

lGoogle

Play

<TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerHorizontal="true"android:layout_centerVertical="true"android:text="Hi, this is my info

page“android:id="@+id/myMessage"

/>

Page 27: Andriod developer training

TextView

www.kerneltraining.com/android-development

Project View

sign/Text Switch

Flat files

lGoogle

Play

Adding android:id attribute to the TextView tag generates a unique id which is associated with the current TextView.

This id can be used to manage the TextView in the activity code as follows:

@Overridepublic void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);TextView tv =

(TextView)findViewById(R.id.myMessage);tv.setText("I have changed the text

dynamically!");}

Page 28: Andriod developer training

Button

www.kerneltraining.com/android-development

Project View

sign/Text Switch

Flat files

lGoogle

Play

<Button> tag is used to generate a button in an Android

application.

Some of the important attributes for button are:

— android:layout_width

— android:layout_height

— android:text

— android:id

The click of a button generates a click event

This event is handled by onClick() method of OnClickListener

interface

Page 30: Andriod developer training

THANK YOUfor attending Demo of

www.kerneltraining.com/android-development