workshop on android app development

98
Entwicklers © 2015 Workshop on Android Application Development along-with the Latest Mobile Technologies & its Market Trend J.K. Institute of Applied Physics & University of Allahabad Entwicklers

Upload: entwicklers

Post on 07-Aug-2015

313 views

Category:

Education


1 download

TRANSCRIPT

Entwicklers © 2015

Workshop on Android Application Development along-with the

Latest Mobile Technologies & its Market Trend

J.K. Institute of Applied Physics & Technology University of Allahabad

Entwicklers

Entwicklers Entwicklers © 2015

Course Content

> Android Basics

> Android Components

> Android Application Architecture

> Android Development Kit

> Android Virtual Device Manager

> Creating Sample Android App

> Executing Sample App in Virtual Device

> Directory Structure > Explicit Intent

Entwicklers Entwicklers © 2015

Course Content

> Implicit Intent

> Layout Manager and View Groups

> Generic Values and XMLs

> Resources

> Pre-packaged Application

> Notifications > Creating App Widget

> Designing User Interface

> Publishing App in the Android Market

Entwicklers Entwicklers © 2015

About Entwicklers

A Group of Programming and Gadget Geeks Started by people who believe in learning, developing and

sharing Provides support on new technologies and tools. Connects students with the latest happenings and

advancements in the world of technology. Believes in the motto of :-

“Develop the Future in Your hand”

Entwicklers Entwicklers © 2015

Irina Blok

She worked as a designerat Google.Create your own Android

logo with Androidify App.

Entwicklers Entwicklers © 2015

The Man behind Android,i.e. the founder of Android, Andy Rubin

Entwicklers © 2015

ANDROID Android, Inc. was originally founded in Palo Alto, California in

October 2003 by Andy Rubin, Rich Miner, Nick Sears and Chris White to develop, "smarter mobile devices that are more aware of its owner's location and preferences".

Started as Open Handset Alliance by a group of 84 companieshttp://www.openhandsetalliance.com/

Is completely open source Based on Apache License Take the source code, make all the changes you need and

you don't have to contribute your code back Uses Linux as the core kernel though some of the Linux kernel

changes are not still accepted by Linus Torvalds. Original Equipment Manufacturers (OEMs) take the Android OS,

add their own packages for their hardware & they ship the device.

Entwicklers © 2015

ANDROID ECOSYSTEM

Entwicklers © 2015

ANDROID ECOSYSTEMVarious versions :

Eclaire (2.0), Froyo (2.2), Gingerbread (2.3), Honeycomb (3.2), Icecream Sandwich (4.0.3), Jelly Bean (4.1), Keylime Pie (4.2)

Honeycomb onwards is suitable for tabletsOEM's are free to differentiate for various hardwareBasic OS has to be certified for Google Android

Compatibility Test Suite for being called a Android based device

What does Google gain out of AndroidProliferation of its servicesMore ads money

Entwicklers © 2015

ANDROID Facts

Entwicklers © 2015

ANDROID Facts

Entwicklers © 2015

Mobile Operating Systems

Entwicklers © 2015

Tricky Questions

Entwicklers © 2015

Chronology of Mobile OS Platforms

1979–92 Mobiles had embedded systems to control operation. 1993 The first smartphone, the IBM Simon, had a touchscreen,

email, and PDA features. 1996 Palm Pilot 1000 personal digital assistant is introduced

with the Palm OS mobile operating system. 1996 First Windows CE Hand-held PC devices are introduced. 1999 Nokia S40 OS was officially introduced with the launch of

the Nokia 7110. 2000 Symbian became the first modern mobile OS on a

smartphone with the launch of the Ericsson R380. 2001 The Kyocera 6035 is the first smartphone with Palm OS. 2002 Microsoft's first Windows CE (Pocket PC) smartphones

were introduced.

Entwicklers © 2015

Chronology of Mobile OS Platforms

2002 BlackBerry released its first smartphone. 2005 Nokia introduced Maemo OS, the 1st internet tablet N770. 2007 Apple iPhone with iOS introduced as an iPhone, "mobile

phone" and "internet communicator." 2007 Open Handset Alliance (OHA) formed by Google, HTC,

Sony, Dell, Intel, Motorola, Samsung, LG, etc. 2008 OHA releases Android 1.0 with the HTC Dream (T-Mobile

G1) as the first Android phone. 2009 Palm introduced webOS with the Palm Pre. By 2012

webOS devices were no longer sold. 2009 Samsung announces the Bada OS with the introduction of

the Samsung S8500.

Entwicklers © 2015

Chronology of Mobile OS Platforms

2010 Windows Phone OS phones are released but are not compatible with the previous Windows Mobile OS.

2011 The MeeGo the first mobile Linux, combined Maemo and Moblin, was introduced with Nokia N9 in effect of cooperation of Nokia, Intel and Linux Foundation.

In September 2011 Samsung, Intel and the Linux Foundation announced that their efforts will shift from Bada, MeeGo to Tizen during 2011 and 2012.

In October 2011 the Mer project was announced, centered around an ultra-portable Linux + HTML5/QML/JS Core for building products with, derived from the MeeGo codebase.

2012 The Lenovo K800 was the first Intel powered smartphone (Android OS).

Entwicklers © 2015

Important factsA mobile operating system,

also referred to as mobile OS, is an operating system that operates a smartphone, tablet, PDA, or other mobile device.

Few famous mobile OSs are:-1)Android 2)Windows Phone3)iOS 4)Blackberry5)Symbian 6)Tizen7)Sailfish OS

and many more …...

Entwicklers © 2015

Important facts

Entwicklers © 2015

Important facts

Source model closed source with open source components

Latest release 1.1.2.16 / 25 February 2015

Marketing target Mobile and general purpose

Kernel type Monolithic (Linux)

Entwicklers © 2015

Important facts

Mobile OS PC OSSmall form factor (3-10'') Large form factor (10-65'')

Low power consumption(0-2 Watts) Low power consumption(8-20 Watts)

Lower memory (min. 32MB) Lower memory (min. 1GB)

Lower CPU speeds (min. 200MHz) Lower CPU speeds (min. 1G Hz)

Less disk space (min. 128MB) Less disk space (>100GB)

Maximum sensor integration (gyroscope, accelerometer, … )

No use cases for sensor integration

No keyboard / mouse Keyboard / mouse a must

Lower processing power (basic functionality, like voice, SMS, browsing, email etc.)

High processing power

Advanced devices with touch capability No touch capability (until the recent release of the Intel Ultrabook

Entwicklers © 2015

Mobile Computing

Entwicklers © 2015

Tricky Questions

Why does anyone need mobility?It started off by a means to connect with people in

remote areasAs Nokia put it: "Connecting People"

People rapidly moved away from fixed phones to mobile phones

Enablers of MobilityBusinessSocial aspects

Entwicklers © 2015

Tricky Questions

What is Mobile Computing?In simple terms "Computing for mobile devices"

What does computing involve: CallsSMSAnything else ???

Entwicklers © 2015

How it all started ???

Entwicklers © 2015

Important factsA system for transmitting

voices over a distance using wire or radio, by converting acoustic vibrations to electrical signals.

First patented in 1876 by Alexander Graham Bell.

Bell placing the first New York to Chicago telephone call in 1892

Entwicklers © 2015

ProcessCalls had to be placed manually by placing a request to

the central officeAn operator would switch the calls between the usersDuring 1970-80, computers were used to automatically

switch between the various callsFeatures provided by POTS

Voice mailCaller idCall waitingSpeed dialingConference call

Automated switches used to connected different parties

Entwicklers © 2015

EVOLUTION

Entwicklers © 2015

Mobile RevolutionEnablers

Happened in two verticalsTelecomMobile handsets

Entwicklers © 2015

Important facts

Number of active mobile connections in India?

762.39M Active Mobile Connections

Entwicklers © 2015

Important facts

Number of mobile owners in India?

554.8M Active Mobile Owners

More than 298M, about 54 per cent, of these device owners are in rural areas as compared

to 256M in cities and towns.

Entwicklers © 2015

Important facts

Number of internet users in India?

143.2M Internet Users But only 23.8M user access internet via mobile phones or

other PDAs and around 77% of these users are in rural areas. Acc. to Akamai's State of the Internet Report, South Korea

was once again the only country with an average connection speed of over 20 Mbps (megabits per second)...Among the remaining surveyed countries, the lowest average connection speed was seen in India, at 1.5 Mbps.

Entwicklers © 2015

Mobile Revolution

Entwicklers © 2015

Important factsMobile phones

Were mainly used for voice callsSMS was widely adapted in Asian countriesSMS drove the business for many companies and

businesses evolved around SMS and MMSTelecom companies were looking for the next

"Killer application" other than voice callSemiconductor technology advancements was hugely

responsible for mobile technology revolutionARM hardware platform was being heavily used by many

phone manufacturers (Nokia, Ericsson, …)Reducing chip size (latest is 22nm^2) TSMC chip

Entwicklers © 2015

Tricky Questions

The first hand-held cell phone that was

demonstrated by John F. Mitchell and Dr Martin

Cooper of Motorola in 1973, using a handset weighing around 2.2 pounds (1 kg).

Entwicklers © 2015

Entwicklers © 2015

Tricky Questions

Entwicklers © 2015

Tricky Questions

Entwicklers © 2015

IMPORTANT FACTs

What is it?

A smart phone (or 'smartphone')is a handheld device capable of advanced tasks beyond those of a standard mobile phone.

The term 'smartphone' did not appear until 1997, when Erricson described its GS 88 “Penelope” concept as a “Smart Phone”.

Entwicklers © 2015

Tricky Questions

The first device that can be properly referred to as a

"smartphone" -even though that term was not

yet coined- named IBM Simon Personal Communicator.

Entwicklers © 2015

IMPORTANT FACTsBrand : BellSouth Designed by IBMFirst released : August 16, 1994; 20 years agoAvailability by country : United States August 16, 1994Discontinued : February 1995Units sold : 50,000Dimensions: 8" (H) x 2.5" (W) x 1.5" (D)Weight : 18 oz (510 g)Operating system : Datalight ROM-DOSCPU : Vadem 16 MHz, 16-bit, x86-compatibleMemory : 1 MBStorage : 1 MBBattery : 7.5V NiCadData inputs : • Microphone •Touchscreen with stylusDisplay : 4.5 in × 1.4 in (114 mm × 36 mm), 160px x 293px

monochrome backlit LCD

Entwicklers © 2015

Smartphonecharacteristics

Enables advanced features Email Web Browsing Maps Media – audio/video

Disk space ~ 2GB RAM ~ 1GB CPU ~ 1.5GHz Target user base

On the move users (business, sales force etc.)

Tech users

Entwicklers © 2015

Tablet devicecharacteristics

Pretty much everything available on a PC / Laptop

Browsing Maps Email Movies - HD 1080p External connectors

Entwicklers © 2015

PC vs smartphonesand Tablets

PCs Smartphones/TabletsMainly driven by Intel x86 chipset (95% of the market).

Mainly driven by ARM chipset (95% of the market).

Higher processor speed. Lower processor speed.High memory. Low memory.Suitable for heavy processing.

Suitable for normal processing (browsing, emails, … ).

Too much power consumption.

Less power consumption.

Entwicklers © 2015

Tricky Questions

Is there practically any difference between a tablet and a phone?

So why can't companies create only a phone or a tablet and why both?

No

User base

Entwicklers © 2015

Mobile Application Important Aspects

Entwicklers © 2015

User Base

Entwicklers © 2015

Important facts

What is User Base?

The number of people who use a particular product or service, especially one available on the Internet.

Entwicklers © 2015

Important facts

What is its importance?

Money

Entwicklers © 2015

Mobile phoneuser base

Basic phone usersCalling

SMS oriented usersCallingSMSAPAC region is highly SMS driven

Tech usersCallingBrowsingEmailsMaps

Entwicklers © 2015

Well known apps

Entwicklers © 2015

Let's Get Started

Entwicklers © 2015

Android Components

Entwicklers © 2015

ANDROI D Components

Entwicklers © 2015

Android System Architecture

Entwicklers © 2015

Linux at the core

Linux has a scalable architectureAndroid uses Linux as its core OS and creates an

application framework around itCore kernel is mostly independent of hardwareWell-defined support for modules enables an easy way to

support new hardwareExtensive support (ranging from routers to heavy duty

servers)Easy configuration to port it to a new hardwareHas been supported on the Intel x86 platform from

almost its inceptionGood support available even for ARM architecture

Entwicklers © 2015

ANDROID OSARCHITECTURE

Entwicklers © 2015

Android Development Kit

Entwicklers © 2015

ANDROI D SDK

APIs for using the device OS featuresProvides extensive API like:

TelephonyConnectivity (Network, Bluetooth, NFC etc.) Productivity (Phonebook, Calendar, Email, etc.)UI (a unified Android look & Feel)Sensors (accelerometer, gyroscope etc.) Browser engine…...

Entwicklers © 2015

ANDROI D Studio

What is Gradle?

Entwicklers © 2015

Entwicklers © 2015

SystemREQUIREMENTS

Windows•Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit)

•2 GB RAM minimum, 4 GB RAM recommended

•400 MB hard disk space

•At least 1 GB for Android SDK, emulator system images, and caches

•1280 x 800 minimum screen resolution

•Java Development Kit (JDK) 7

•Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

Entwicklers © 2015

App DevelopmentWorkflow

Entwicklers © 2015

App DevelopmentWorkflow

Entwicklers © 2015

Languages AndTools

Programming Languages / ToolsJavaC/C++ for native applicationsEclipseLinux (not mandatory)

Graphics elementsDesign tools (Adobe tools)Gimp, Krita in Ubuntu

Audio elementsCreate your own audio clipsAudio recorder tools in Ubuntu

Entwicklers © 2015

Android Virtual Device Manager

Entwicklers © 2015

Android Vi rtualDevice

An emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android Emulator.

An AVD consists of:– A hardware profile– A mapping to a system image–Other options– A dedicated storage area on your development

machine

Entwicklers © 2015

Entwicklers © 2015

Creating Sample Android App

Entwicklers © 2015

Android App Components

Entwicklers © 2015

Activity and itscycle

An Activity is an application component that provides a screen with which users can interact in order to do something, such as

dial the phone, take a photo, send an email, or view a map. Each activity is given a window in which to draw its user interface.

The window typically fills the screen, but may be smaller than the screen and float on top of other windows.

Entwicklers © 2015

Activity and itscycle

Entwicklers © 2015

Fragments

A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple

fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can

think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input

events, and which you can add or remove while the activity is running (sort of like a "sub activity" that you

can reuse in different activities).

Entwicklers © 2015

Fragments

Entwicklers © 2015

Action bar

The action bar is one of the most important design elements you can implement for your app's activities. It provides several user interface features that make your app immediately familiar to users by offering consistency between other Android apps. Key functions include:– A dedicated space for giving your app an identity and

indicating the user's location in the app.– Access to important actions in a predictable way.– Support for navigation and view switching.

Entwicklers © 2015

layouts

A layout defines the visual structure for a user interface, such as the UI for an activity or app widget. You can declare a layout in two ways:– Declare UI elements in XML– Instantiate layout elements at runtime

Entwicklers © 2015

layoutsCommon Layouts

Entwicklers © 2015

View Groups

Entwicklers © 2015

View Groups

Layouts with a Adapter

Entwicklers © 2015

Dialogs

A dialog is a small window that prompts the user to make a decision or enter additional information. A

dialog does not fill the screen and is normally used for modal events that require users to take an action

before they can proceed.

Entwicklers © 2015

Dialogs

Entwicklers © 2015

Directory Structure

Entwicklers © 2015

Intents

Entwicklers © 2015

Explicit Intent

Entwicklers © 2015

Implicit Intent

Entwicklers © 2015

Resources

Entwicklers © 2015

Resources

It takes more than just code to build a great app.So, resources are the additional files and static

content that your code uses, such as bitmaps, sound or music, layout definitions, user interface strings,

animation instructions, and more.

Entwicklers © 2015

Pre-packaged Application

Entwicklers © 2015

Notifications

Entwicklers © 2015

Notifications

A notification is a message you can display to the user outside of your application's normal UI. When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user opens the notification drawer.

Both the notification area and the notification drawer are system-controlled areas that the user can view at

any time.

Entwicklers © 2015

Creating App Widget

Entwicklers © 2015

App Widgets

App Widgets are miniature application views that can be embedded in other applications (such as the Home screen) and receive periodic updates. These views are

referred to as Widgets in the user interface, and you can publish one with an App Widget provider. An

application component that is able to hold other App Widgets is called an App Widget host.

Entwicklers © 2015

Designing User Interface

Entwicklers © 2015

User Interface

An app's user interface is everything that the user can see

and interact with. Android provides a variety of pre-build UI components such as structured layout objects and UI controls

that allow you to build the graphical user interface for your app. Android also provides other UI modules for special interfaces

such as dialogs, notifications, and menus.

Entwicklers © 2015

User Interface

Best Practices

Designing for Multiple Screens Designing for TV Creating Custom Views Creating Backward-Compatible

UI's Implementing Accessibility Managing the System UI Customizing Action-bar.

Entwicklers © 2015

Publishing App in the Android Market

Entwicklers © 2015

Publishing App

Entwicklers © 2015

Publishing App

Entwicklers © 2015

Transforminto

You Pro

Develop Great Apps