You are on page 1of 39

Android

Overview

What is Android?
What do you need in order to learn Android?
Installation and Configuring Eclipse for the
development.
Basic Eclipse concept.
How to Start.

Overview

What is Android?
What do you need in order to learn Android?
Installation and Configuring Eclipse for the
development.
Basic Eclipse concept.
How to Start.

What is Android?
An open source Linux-based operating system
intended for mobile computing platforms.

Bought by Google in year 2005, original owned


by Android Inc. led by Andy Rubin.

Includes a Java API for developing applications.

It is not a device or product

History(Not so important)

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

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.

Applications

Built in and user apps


Can replace built in apps

Overview

What is Android?
What do you need in order to learn Android?
Installation and Configuring Eclipse for the
development.
Basic Eclipse concept.
How to Start.

Prerequisite For Android Apps Development.

Java!

inheritance, method overriding


interfaces, casting
exceptions
debugging
reading API documentation

Eclipse
easy to pick up quickly, though

Hardware ?
The emulator that is part of the Android toolset
Also Known as AVD.

Or your Android Smart Phones.

Overview

What is Android?
What do you need in order to learn Android?
Installation and Configuring Eclipse for the
development.
Basic Eclipse concept.
How to Start.

Steps
Install JDK
Install Android SDK
Install Eclipse
Install Eclipse Plug-ins for Android
Sample Project: Hello, Android

Installation - JDK
JDK is required to run Eclipse and develop
Android applications.
Installation Process
Download the latest version of JDK from
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Install the downloaded JDK


Add the path of the JDK's 'bin' directory to the system

Installation - JDK (Cont.)


Installation Process
(Cont.)
For Windows, add it to
Environment Variables:

Installation - JDK (Cont.)


Test
If you have successfully installed JDK, you should
be able to see following messages in your
command prompt window or terminal on typing:
C:\Users\Gaurav>javac -version
javac 1.7.0_04

Get Eclipse
Complete information is also here:
http://developer.android.com/sdk/installing.html
Download Eclipse Indigo
http://www.eclipse.org/downloads/packages/eclipse-ide
-java-ee-developers/indigosr2

After downloaded, decompress in a directory


name eclipse
Note, there is no installation for eclipse. Once it is
decompressed, you are ready to run it. But you
can only start eclipse by opening a file browser
and double clicking on eclipse.exe

Get Android SDK


Go to http://developer.android.com/sdk/index.html
Install
Will check that the correct version of jdk is
installed.
install in c:\Android
After installing SDK, the SDK manager should run.

Select SDK Platform-tools.


Download each API version.
However, dont download every package
within the API version (it takes to long).
Instead, select SDK platform, samples,
Google api and then the package for you
phone.
Download Android Support package
And, Google USB Driver package

AVD

Install ADT Eclipse plugin


For instructions, also see
http://developer.android.com/sdk/eclipse-adt.html#installing
Start eclipse

Install ADT Eclipse plugin


In Eclipse, go to Help -> Install New Software

Install ADT Eclipse plugin

Click Add in top right


Enter:
Name: ADT Plugin
Location: https://dl-ssl.google.com/android/eclipse/

Click OK

Install ADT Eclipse plugin


select Developer Tools, click Next

Click Next and then Finish. Afterwards, restart Eclipse


Specify SDK location (next 3 slides)

Must do this every time start a new project in a new location (at least in
Windows)

Install ADT Eclipse plugin

Install ADT Eclipse plugin

Install ADT Eclipse plugin

Overview

What is Android?
What do you need in order to learn Android?
Installation and Configuring Eclipse for the
development.
Basic Eclipse concept.
How to Start.

Workbench Terminology
Menu bar

Text
editor

Tool bar
Perspective
and
Fast View
bar

Outline
view
Resource
Navigator
view
Bookmarks
view

Properties
view

Message
area
Stacked
views

Editor
Status
area
Tasks
view

Java Perspective
Java-centric view of files in Java projects
Java elements meaningful for Java programmers

Java
project
package
class
field
method

Java
editor

Java Perspective
Browse type hierarchies
Up hierarchy to supertypes
Down hierarchy to subtypes

Type
hierarchy

Selected
types
members

Java Editor
Hovering over identifier shows Javadoc spec

Java Editor

Method completion in Java editor


List of plausible methods

Doc for method

Java Editor
On-the-fly spell check catches errors early

Click
to see
fixes

Problem
Quick
fixes
37

Preview

Eclipse Shortcuts
Shortcut

Description

Ctrl+Space

Context sensitive content completion


suggestions while editing Java code.

Ctrl + D

Deletes line

Ctrl + Shift + DEL

Delete until end of line

Ctrl + DEL

Delete next element

F3

Opens editor to selected element (type) or


navigate to the declaration of the selected
variable

Alt+Left

Backward History

Alt+Right

Forward History

Ctrl+L

Go to Line

CTRL + M

Maximize or maximize current tab.

CTRL + I

Corrects indentation.

CTRL + D

Delete row

More on :http://www.vogella.com/articles/EclipseShortcuts/article.html

Overview

What is Android?
What do you need in order to learn Android?
Installation and Configuring Eclipse for the
development.
Basic Eclipse concept.
How to Start.

You might also like