android development with flash platform

63
Android Development with Flash Platform Relatore: Luca Mezzalira Monday, October 11, 2010

Upload: luca-mezzalira

Post on 29-Jun-2015

1.456 views

Category:

Technology


2 download

DESCRIPTION

This is my presentation made in a JUG meeting about my experience on Android development with Flash Platform.If you want an English version feel free to contact me

TRANSCRIPT

Page 1: Android Development with Flash Platform

Android Development with Flash Platform

Relatore: Luca Mezzalira

Monday, October 11, 2010

Page 2: Android Development with Flash Platform

2

Luca Mezzalira

Monday, October 11, 2010

Page 3: Android Development with Flash Platform

3

Disclaimer

Tutte le informazioni presenti in questo seminario possono essere modificate in fase di rilascio da parte di Adobe.

I pensieri, parole e opere espresse durante questo seminario son punti di vista personali maturati durante lo sviluppo su Android

Monday, October 11, 2010

Page 4: Android Development with Flash Platform

4

Agenda

. Overview Flash Platform

. Flash Platform & Android

. Tips & tricks (UI & Dev)

. TG24

. Risorse online & offline

. Domande & risposte

Monday, October 11, 2010

Page 5: Android Development with Flash Platform

un po di statistiche...

5Monday, October 11, 2010

Page 6: Android Development with Flash Platform

un po di statistiche...

6Monday, October 11, 2010

Page 7: Android Development with Flash Platform

un po di statistiche...

7

http://stocksandblogs.com

Monday, October 11, 2010

Page 8: Android Development with Flash Platform

8

Cos’è la Flash Platform

E’ l’insieme di tecnologie che utilizzano il flash player in tutte le sue declinazioni.

Flex Flash AIR Flash Lite

Flash Media Server Flash Catalyst

.......

Monday, October 11, 2010

Page 9: Android Development with Flash Platform

9

Flash Platform

Monday, October 11, 2010

Page 10: Android Development with Flash Platform

10

Apps & Mobile sites

Monday, October 11, 2010

Page 11: Android Development with Flash Platform

11

Flash Player 10.1 ed AIR 2

Monday, October 11, 2010

Page 12: Android Development with Flash Platform

12

Flash Player on Mobile

Monday, October 11, 2010

Page 13: Android Development with Flash Platform

13

Concetti base di Flash

Monday, October 11, 2010

Page 14: Android Development with Flash Platform

14

Actionscript è il linguaggio di programmazione che si utilizza per interagire con gli elementi presenti sullo stage di un filmato Flash.

Esistono molti software che ci aiutano a scrivere Actionscript per i nostri prodotti Flash

Actionscript

Monday, October 11, 2010

Page 15: Android Development with Flash Platform

15

. Actionscript 1 che viene utilizzato in Flash Lite 1.1 e fino a Flash 4/5

. Actionscript 2 che viene utilizzato Flash Lite 2.x e 3.x e fino alla ultima versione, ovvero quello attuale la 10

. Actionscript 3 che viene utilizzato su Flex, AIR e dal Flash Player 9 in poi.

Actionscript

Monday, October 11, 2010

Page 16: Android Development with Flash Platform

16

. Async operations

. Mono-thread

. Vector based

. DisplayList

. OOP & micro-architecture

. XML, JSON, WebService, AMF...

. No direct connection to database (online)

Key Concept

Monday, October 11, 2010

Page 17: Android Development with Flash Platform

17

AIR Adobe Integrated

Monday, October 11, 2010

Page 18: Android Development with Flash Platform

18

AIR Adobe Integrated

AIR è un cross-operating system runtime...

Può essere installato su Mac OS X 10.4.8 e superiori (intel e PPC) e Windows XP, Win 7 e Vista, Linux (Ubuntu e Fedora) e... ANDROID 2.2

Monday, October 11, 2010

Page 19: Android Development with Flash Platform

19

AIR Adobe Integrated

AIR permette di utilizzare le seguenti tecnologie:

. Actionscript / MXML

. HTML / JS / CSS / AJAX

. PDF

Monday, October 11, 2010

Page 20: Android Development with Flash Platform

20

Desktop VS RIA

Monday, October 11, 2010

Page 21: Android Development with Flash Platform

21

AIR Adobe Integrated

Perchè AIR è così interessante:

. cross-platform

. IDE di lavoro familiari

. facilità di porting

. rapid prototyping

Monday, October 11, 2010

Page 22: Android Development with Flash Platform

22

AIR Adobe Integrated

. interazione tra tecnologie che fino ad oggi hanno avuto una vita propria (o quasi)

. delivery dell’applicazione semplice

. facilità di installazione e aggiornamento

UN FUTURO DECISAMENTE INTERESSANTE

Monday, October 11, 2010

Page 23: Android Development with Flash Platform

23

AIR features

Clipboard

FileSystem

SQLite database

Finestre personalizzate

Native Drag & Drop

HTML control

Monday, October 11, 2010

Page 24: Android Development with Flash Platform

24

AIR features

Updater framework

Native Window

URLMonitor

Native Process

Microphone raw data

Socket server

Monday, October 11, 2010

Page 25: Android Development with Flash Platform

25

AIR features

Multitouch API

Screen reader

Lanciare altri applicativi installati

Lettura dispositivi di massa USB

Global error handler

Monday, October 11, 2010

Page 26: Android Development with Flash Platform

26

AIR features on Android

Camera Roll

Accelerometro

GPS

Camera UI

StageWebView

SMS & Phone call

Screen DimmingMonday, October 11, 2010

Page 27: Android Development with Flash Platform

27

Esportazione diretta

Monday, October 11, 2010

Page 28: Android Development with Flash Platform

28

08 October 2010

Monday, October 11, 2010

Page 29: Android Development with Flash Platform

29

CameraUI & CameraRoll

Monday, October 11, 2010

Page 30: Android Development with Flash Platform

30

Progettazione UI

Monday, October 11, 2010

Page 31: Android Development with Flash Platform

31

Vector vs Bitmap

Monday, October 11, 2010

Page 32: Android Development with Flash Platform

32

UI tips & tricks

. Evitare i contorni, forme vettoriali lunghe e strette, angoli squadrati, troppe linee e troppi dettagli in vettori

. A volte è meglio una Bitmap

. Progettate sia in Landscape che in Portrait mode

. Max grandezza oggetti 4096x4096

Monday, October 11, 2010

Page 33: Android Development with Flash Platform

33

Working with textfield

. Moderare font embedding

. A volte è meglio una Bitmap

. Testi descrittivi con font presenti nel dispositivo

. Non utilizzare MAI il TLF!

Monday, October 11, 2010

Page 34: Android Development with Flash Platform

34

Skeleton component

Monday, October 11, 2010

Page 35: Android Development with Flash Platform

35

Best Practices & Optimization

Monday, October 11, 2010

Page 36: Android Development with Flash Platform

36

Garbage Collector

MARK & SWEEP

unloadAndStop(), null, delete

Monday, October 11, 2010

Page 37: Android Development with Flash Platform

37

Android Manifest

Monday, October 11, 2010

Page 38: Android Development with Flash Platform

38

GPU vs CPU

Monday, October 11, 2010

Page 39: Android Development with Flash Platform

39

GPU vs CPU

CacheAsBitmap. movimenti in x . movimenti in y . tween

CacheAsBitmapMatrix. alpha . ridimensionamento . distorsione

. rotazione

Monday, October 11, 2010

Page 40: Android Development with Flash Platform

40

Performance is good!

Monday, October 11, 2010

Page 41: Android Development with Flash Platform

41

Media suggestions

File audio: AAC & MP3

Video: FLV & F4V

E’ possibile fruire video in download progressivo e in streaming

Monday, October 11, 2010

Page 42: Android Development with Flash Platform

42

Multiple screen content

. Coordinate relative

. Tradeoff tra vettori e bitmap

. Disaccoppiamento delle caratteristiche di piattaforma

. Attenzione alle architetture software!

Monday, October 11, 2010

Page 43: Android Development with Flash Platform

43

Object Pooling

Monday, October 11, 2010

Page 44: Android Development with Flash Platform

44

AS3 optimization

. GPU mode con i video

. Rimuovere i listeners

. Mettere a null gli oggetti

. Framerate tra 20/24 fps

. Non abusare delle Gesture

. hasPriority = true; (solo su Flash Player 10.1)

. EnterFrame invece che il Timer

Monday, October 11, 2010

Page 45: Android Development with Flash Platform

45

AS3 optimization

. Vector al posto degli Array

. StageQuality e Dynamic framerate

. Consapevolezza dello stack

. No CPU compound

Monday, October 11, 2010

Page 46: Android Development with Flash Platform

46

Warning! You must avoid...

. Inserire oggetti fuori dallo stage di lavoro

. Inserire filtri su oggetti quando si renderizza con GPU

. Ridisegnare oggetti in GPU mode

Monday, October 11, 2010

Page 47: Android Development with Flash Platform

47

Natural Porting

Monday, October 11, 2010

Page 48: Android Development with Flash Platform

48

Dialogo realtime tra device

Monday, October 11, 2010

Page 49: Android Development with Flash Platform

49

Testing

Monday, October 11, 2010

Page 50: Android Development with Flash Platform

50

My 2 cents

Progettate (UI & Code)

Modularizzate

Ottimizzate il codice

Testate

Monday, October 11, 2010

Page 51: Android Development with Flash Platform

51

startkit for developing on

+++

Monday, October 11, 2010

Page 52: Android Development with Flash Platform

NEWS52

Monday, October 11, 2010

Page 53: Android Development with Flash Platform

53Monday, October 11, 2010

Page 54: Android Development with Flash Platform

54Monday, October 11, 2010

Page 55: Android Development with Flash Platform

55

Google TV

Monday, October 11, 2010

Page 56: Android Development with Flash Platform

56

HTML 5 vs Flash Platform

Monday, October 11, 2010

Page 57: Android Development with Flash Platform

57Monday, October 11, 2010

Page 58: Android Development with Flash Platform

58Monday, October 11, 2010

Page 59: Android Development with Flash Platform

59

Flash su embedded devices è una realtà

Attualmente possiamo farlo girare su ARM 7, Intel Atom, SnapDragon...

Esempi di hardware per il testing possono essere Tegra II, Motherboard ATOM...

Flash on Embedded

Monday, October 11, 2010

Page 60: Android Development with Flash Platform

60

. adobe.com/devnet

. tv.adobe.com

. Adobe blog (feeds.adobe.com)

Risorse online

Monday, October 11, 2010

Page 61: Android Development with Flash Platform

61

Risorse offline

and more...Monday, October 11, 2010

Page 62: Android Development with Flash Platform

flashplatformgeeks.com

62Monday, October 11, 2010