21
ANDROID DEVELOPMENT Paulo Hecht

Android Development

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Android Development

ANDROID DEVELOPMENTPaulo Hecht

Page 2: Android Development

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

Page 3: Android Development

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

Page 4: Android Development

MARKET SHARE

4

Page 5: Android Development

ANDROID SDK

SDK Manager QEMU Emulator AVD Manager ADB Fastboot

Any IDEMay use Apache Ant

5

Page 6: Android Development

ANDROID ADT

Eclipse Plugin / Bundle

6

Page 7: Android Development

ANDROID STUDIO

IntelliJ Idea Community Refactoring, Fixes, Multiple Config Preview

7

Page 8: Android Development

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

Page 9: Android Development

EMULADORES

QEMU Virtual Box VMware

9

Page 10: Android Development

PUBLISHING

10

Page 11: Android Development

CORE CONCEPTS

Activity Lifecycle

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

11

Page 12: Android Development

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

Page 13: Android Development

CORE CONCEPTS

Context Application Environment Language Resolution/Density Orientation

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

13

Page 14: Android Development

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

Page 15: Android Development

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

Page 16: Android Development

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

Page 17: Android Development

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

Page 18: Android Development

AGILE DEVELOPMENT

18

Page 19: Android Development

TTD

19

QUALITY Focus Continuous Deployement

Android testing framework Roboelectric

DDD and BDD

Page 20: Android Development

HTML5

20

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

Jquery Mobile Sencha Touch

Page 21: Android Development

GAMES?

21

AndEngine Cocos2D Corona SDK NME Haxe Unity3D Unreal