Installing eclipse & sdk

33
INSTALLING ECLIPSE AND ANDROID SDK CT Muthumani

description

 

Transcript of Installing eclipse & sdk

Page 1: Installing eclipse & sdk

INSTALLING ECLIPSE AND

ANDROID SDK

CT Muthumani

Page 2: Installing eclipse & sdk

Requirements for our Workspace:

* Java JDK/JRE

* Android SDK

* Eclipse IDE

* ADT Plugin for Eclipse

Page 3: Installing eclipse & sdk

JAVA

Before you start developing a Android application, make sure that you have installed Java on your machine.

JDK 5 or JDK 6 (JRE alone is not sufficient)

Page 4: Installing eclipse & sdk

ANDROID SDK

SDK include: device emulator

Debugger

memory & performance profiling

plug-in for Eclipse IDE

You can download Android SDK from Android’s Developer Website.

http://developer.android.com/sdk/index.html

Page 5: Installing eclipse & sdk

ECLIPSE IDE

Eclipse is the most popular open source IDE for developers.

It is written mostly in Java and can be used to develop applications in Java and, by means of various plug-ins, other programming languages.

It has plug-in support from Android for development.

Page 6: Installing eclipse & sdk

ADT PLUG-IN FOR ECLIPSE

Android Development Tools (ADT) is a plug-in for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.

ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools

Now we have Installed Java on your machine, and extracted out Eclipse to your preferred location.

Now we’ll configure our ADT Plugin with Eclipse.

Page 7: Installing eclipse & sdk

Goto Help > Install New Software 

Page 8: Installing eclipse & sdk

Location: https://dl-ssl.google.com/android/eclipse/

Page 9: Installing eclipse & sdk

Click on OK then Next. by this we have installed our ADT Plugin into eclipse. Now we need to configure our plug-in.

Page 10: Installing eclipse & sdk

Configuring ADT Plugin:Goto Window > Preferences and select Android from the left

Panel

Page 11: Installing eclipse & sdk

Installing Android Platform

Goto Eclipse’s Window > Android SDK and AVD Manager

Page 12: Installing eclipse & sdk

You have three things in your left navigation panel: Virtual devices, Installed packages, and Available Packages.

Page 13: Installing eclipse & sdk

AVD Configuration:Goto Window > Android SDK and AVD Manager > Virtual Devices

Click on New

 In the pop up window, provide any Name for your plug­in

 The version of Android you want to use for your testing purposes in Target field. 

Finally click on Create AVD button, and you are done. 

Page 14: Installing eclipse & sdk
Page 15: Installing eclipse & sdk

ANDROID BUILDING BLOCKS

Page 16: Installing eclipse & sdk

Building Blocks

Page 17: Installing eclipse & sdk

ACTIVITIES

● Activities are stacked ● like a deck of cards.● only one is visible● only one is active● new activities are

placed on top

Page 18: Installing eclipse & sdk

Activities State

Active

­At top of the stack

Paused

­Lost focus but still visible

­Can be killed

Stopped

­Not at the top of the stack

Dropped

­Killed to reclaim its memory

Page 19: Installing eclipse & sdk

Views

Views are basic building blocks

Know how to draw themselves

Respond to events

Organized as trees to build up GUI

Described in XML in layout resources

Page 20: Installing eclipse & sdk

Loading A Layout

Android complies the XML layout code that is later loaded in code usually by

public void onCreate(Bundle savedInstance){

......setContentView(R.layout.filename);....

}

Page 21: Installing eclipse & sdk

IntentsIntents are used to move from one Activity to another

Describes what the application wants

An Intent provides a facility for performing late runtime binding between the codes in different activity.

Page 22: Installing eclipse & sdk

Services

Services run in the background

Wont interact with the user

Run on the main thread of the process

Is kept running as long as

– Is started

– Has connections

Page 23: Installing eclipse & sdk

Notifications

Notify the user about events

Sent through NotificationManager

Types

– Persistent icon

– Turning LEDS

Page 24: Installing eclipse & sdk

Content Providers

ContentProviders are objects that can

Retrive data

Store data

Data is available to all applications

Only way to share data across packages

Usually the back-end is SQLite

Data exposed as a unique URI

Page 25: Installing eclipse & sdk

AndroidManifest.xml

Control file that tells the system what to do

It is the glue that actually specifies which intents your Activities receives

Specifies permissions

Page 26: Installing eclipse & sdk

HELLO WORLD PROGRAM

Page 27: Installing eclipse & sdk
Page 28: Installing eclipse & sdk

Java File

Page 29: Installing eclipse & sdk

XML File

Page 30: Installing eclipse & sdk

Emulator

Page 31: Installing eclipse & sdk

Output

Page 32: Installing eclipse & sdk

Questions ?

Page 33: Installing eclipse & sdk

33

THANK YOU