Android Development

Post on 27-Nov-2014

363 views 1 download

description

 

Transcript of Android Development

ANDROID DEVELOPMENTPaulo Hecht

AGENDA Android Android SDK Android ADT Android Studio Android NDK Emuladores Publishing Core Concepts of SDK API

Activity Intent Context Resources

Architecture Patterns Agile Development Test Driven Development HTML5 Games?

2

ANDROID

Open-Source Linux Based Android Inc. aquired by Google in 2005 First device released with Android in 2008 Samsung, Motorola, HTC, LG, etc. Mobile Phones, Tablets, Tvs, Ouya 3034 different devices.

3

MARKET SHARE

4

ANDROID SDK

SDK Manager QEMU Emulator AVD Manager ADB Fastboot

Any IDEMay use Apache Ant

5

ANDROID ADT

Eclipse Plugin / Bundle

6

ANDROID STUDIO

IntelliJ Idea Community Refactoring, Fixes, Multiple Config Preview

7

ANDROID NDK

Native Code using C/C++ Java Native Interface (JNI) Android 2.2 Dalvik has a just-in-time compiler

CPU Intensive applications I mean really INTENSIVE… Reuse C/C++ code Did I mention how INTENSIVE it must be?

8

EMULADORES

QEMU Virtual Box VMware

9

PUBLISHING

10

CORE CONCEPTS

Activity Lifecycle

The OS is who decidesif your activity willbe closed or not.

11

CORE CONCEPTS

Activity Single focused thing the user is doing. It’s generally a whole window. A canvas where you layout the app.

Now, there are Activity Groups.

Design for Micro-tasks in mobiles.

12

CORE CONCEPTS

Context Application Environment Language Resolution/Density Orientation

Resources Strings, Images, Layouts, Colors All have specific context

13

CORE CONCEPTS

Intent Denotes the intention to open another activity. Stack another activity in your app. Opens a registered Intent:

Share Something Capture a Picture Get a Bar/QR Code Send a Text

14

CORE CONCEPTS

Intent Examples:

Launch Camera:Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);

Launch Share:Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); sharingIntent.setType("text/plain");sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text Here");startActivity(Intent.createChooser(sharingIntent, "Share via"));

Launch Other Activity:Intent openActivityIntent = new Intent(getApplicationContext(), NextScreen.class);startActivity(openActivityIntent);

15

ARCHITECTURE PATTERNS

MVC (Model-View-Controller) Views are activities Controllers are handlers Models are domain

objects

16

Model

View Controller

show

user inputqu

ery

notif

y

change

ARCHITECTURE PATTERNS

MVP (Model-View-Presenter) Views are activities. Presenters retrieve data,

format, display and receiveevents.

Models are strictlydomain objects.

17

Presenter

View

Model

user

inpu

t

show

data

flow

AGILE DEVELOPMENT

18

TTD

19

QUALITY Focus Continuous Deployement

Android testing framework Roboelectric

DDD and BDD

HTML5

20

UIView Wrapper (PhoneGape, Titanium) Access to sensors Some mobile look-and-feel frameworks:

Jquery Mobile Sencha Touch

GAMES?

21

AndEngine Cocos2D Corona SDK NME Haxe Unity3D Unreal