Going mad with android

33
TSCS (The School of Creative Sciences) GOING MAD WITH ANDROID presentation by

description

This PPT tells you how to create basic apps on android www.tscsindia.com

Transcript of Going mad with android

Page 1: Going mad with android

TSCS (The School of Creative Sciences)

GOING MAD WITH ANDROID

presentation by

Page 2: Going mad with android

TSCS (The School of Creative Sciences)

MAD IS “MOBILE APPS DEVELOPER”

I am MAD.I earn on my own.

Besides MADis cool & fun!

Page 3: Going mad with android

TSCS (The School of Creative Sciences)

ANDROID

Page 4: Going mad with android

TSCS (The School of Creative Sciences)

Future of Android

• Android is a mobile phone operating system powered by Google

• Nearly every device in your house, from your television to your refrigerator, is going to be networked and could very well be Android-powered”, says Google Chairman Eric Schmidt

• Android had a worldwide smart-phone market share of 75% by the third quarter of 2012, with 500 million devices activated in total and 1.3 million activations per day

Page 5: Going mad with android

TSCS (The School of Creative Sciences)

MAKING AN APP ON ANDROID

Page 6: Going mad with android

TSCS (The School of Creative Sciences)

SCOPE OF THIS PPT

1. Mobile Application Development (MAD)2. Intro to Android platform3. Platform architecture4. Application Framework & API5. Application building blocks6. Development tools7. Hello Android8. Porting application to Mobile

Page 7: Going mad with android

TSCS (The School of Creative Sciences)

FEW REASONS TO GO MAD

7

Computer

Email

Fax

Radio

Music player

Word processor Credit cards

Page 8: Going mad with android

TSCS (The School of Creative Sciences)

LET YOUR SMARTPHONE TAKE CARE OF ALL THIS MADNESS

Computer

Email

Fax

Radio

Music player

Word processor

Credit cards

Page 9: Going mad with android

TSCS (The School of Creative Sciences)

What is Android Open software platform for mobile development

A complete stack – OS, Middleware, Applications

An Open Handset Alliance (OHA) project

Powered by Linux operating system

Fast application development in Java

Open source under the Apache 2 license

Page 10: Going mad with android

TSCS (The School of Creative Sciences)

Page 11: Going mad with android

TSCS (The School of Creative Sciences)

Android APIs• android.util

• android.os

• android.graphics

• android.text

• android.database

• android.content

• android.view

• android.widget

• com.google.android.maps android.app

• android.telephony

• android.webkit

Page 12: Going mad with android

TSCS (The School of Creative Sciences)

Application Building Blocks Activity

IntentReceiver

Service

ContentProvider

Page 13: Going mad with android

TSCS (The School of Creative Sciences)

Activities Typically correspond to one UI screen

But, they can: Be faceless Be in a floating window Return a value Activity refers to (J)Frame in Swing

Page 14: Going mad with android

TSCS (The School of Creative Sciences)

Intents Think of Intents as a verb and object; a description of what

you want done E.g. VIEW, CALL, PLAY etc.

System matches Intent with Activity that can best provide the service

Activities and IntentReceivers describe what Intents they can service

Page 15: Going mad with android

TSCS (The School of Creative Sciences)

Intent Receivers Components that respond to broadcast ‘Intents’

Way to respond to external notification or alarms

Apps can invent and broadcast their own Intent

Page 16: Going mad with android

TSCS (The School of Creative Sciences)

Services Faceless components that run in the background

E.g. music player, network download etc…

Page 17: Going mad with android

TSCS (The School of Creative Sciences)

Content Providers Enables sharing of data across applications

E.g. address book, photo gallery

Provides uniform APIs for: querying delete, update and insert.

Content is represented by URI and MIME type

Page 18: Going mad with android

TSCS (The School of Creative Sciences)

ANDROID USER INTERFACES

DIFFERENT LAYOUTSLinear Layout

Absolute LayoutTable Layout

HIERARCHY OF SCREEN ELEMENTS

Page 19: Going mad with android

TSCS (The School of Creative Sciences)

COMPARING ANDROID UI ELEMENTS TO SWING UI ELEMENTS

Activities in Android refers almost to a (J)Frame in SwingViews in Android refers to (J)Components in SwingTextViews in Android refers to a (J)Labels in Swing EditTexts in Android refers to a (J)TextFields in SwingButtons in Android refers to a (J)Buttons in Swing

Page 20: Going mad with android

TSCS (The School of Creative Sciences)

<application> Root element containing declarations of the application-level components contained in the package. This element can also include global and/or default attributes for the application, such as a label, icon,theme, required permission, etc.Quantity: 0 or 1.

<activity> An Activity is the primary thing for an application to interact with the user. The initial screen the user sees when launching an application is an activity, and most other screens they use will be implemented as separate activities declared with additional activity tags.

<intent-filter> Declares what kind of Intents a component supports. In addition to the various kinds of values that can be specified under this element, attributes can be given here to supply a unique label, icon, and other information for the action being described.

Page 21: Going mad with android

TSCS (The School of Creative Sciences)

<action> An action-type that the component supports. Example:

<category> A category-type that the component supports. Example:

Some other Tags Available……<meta-data><receiver> <service> <provider>

Page 22: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT STEPS

Download and Install the Android SDK and Test the Emulator

Installing JDK and JRE(1.5 or above)

Install Eclipse

Install ADT plugin for Eclipse

Page 23: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT CNTD.

New > Project…

Select Android project in wizard menu

Page 24: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT CNTD.

Page 25: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT CNTD.

Main Activity>>

Main.xml>>

Page 26: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT CNTD.

AndroidManifest.xml>>

Page 27: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT CNTD.

>>Running Your First Application

Page 28: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT CNTD.

Output in the emulator

Page 29: Going mad with android

TSCS (The School of Creative Sciences)

APPLICATION DEVELOPMENT CNTD.

UIs using Java way

Page 30: Going mad with android

TSCS (The School of Creative Sciences)

Porting Applications to Mobile Resource files are bundled to .apk file archive

Bundled by aapt tool

One .apk file archive is a Single application

Page 31: Going mad with android

TSCS (The School of Creative Sciences)

Interesting things to do Android is open source

Opportunities for researchers

Get the source, compile and update the device image

Page 32: Going mad with android

TSCS (The School of Creative Sciences)

REFERENCES

http://developer.android.com http://code.google.com/android http://anddev.org

Page 33: Going mad with android

TSCS (The School of Creative Sciences)

Thank You