Transcript
Page 1: Top AIR APIs to bring your mobile apps to life

Mobile Apps

Hemanth SharmaPlatform Evangelist

Adobe Systems Inc.Twitter: www.twitter.com/hemanthsharma

Facebook: www.facebook.com/hemanth.sharmaBlog: www.hsharma.com/tech

to life!

Bring your

Page 2: Top AIR APIs to bring your mobile apps to life

What is Mobile?

• Experience

• Personalization

• Contextual

• Form Factor

Page 3: Top AIR APIs to bring your mobile apps to life

Accelerometer

Page 4: Top AIR APIs to bring your mobile apps to life

Accelerometer

• Accelerometer.isSupported

• event.accelerationX, event.accelerationY, event.accelerationZ

• event.timestamp

Page 5: Top AIR APIs to bring your mobile apps to life

Geolocation

Page 6: Top AIR APIs to bring your mobile apps to life

Geolocation

• Geolocation.isSupported

• event.latitude, event.longitude

• event.heading, event.speed, event.altitude

• event.horizontalAccuracy, event.verticalAccuracy

• event.timestamp

Page 7: Top AIR APIs to bring your mobile apps to life

Multitouch

Page 8: Top AIR APIs to bring your mobile apps to life

Multitouch

• Multitouch.supportsTouchEvents

• Multitouch.maxTouchPoints

• MultitouchInputMode.TOUCH_POINT

• TouchEvent.TOUCH_BEGIN, TouchEvent.TOUCH_END

• TouchEvent.TOUCH_MOVE, TouchEvent. TOUCH_TAP, etc.

Page 9: Top AIR APIs to bring your mobile apps to life

Multitouch Gestures

Page 10: Top AIR APIs to bring your mobile apps to life

Multitouch Gestures• Multitouch.supportsGestureEvents

• MultitouchInputMode.GESTURE

• TransformGestureEvent.GESTURE_SWIPE

• TransformGestureEvent.GESTURE_PAN

• TransformGestureEvent.GESTURE_ROTATE

• TransformGestureEvent.GESTURE_ZOOM

Page 11: Top AIR APIs to bring your mobile apps to life

Multitouch Gestures• TransformGestureEvent.GESTURE_SWIPE

• event.offsetX

• event.offsetY

Page 12: Top AIR APIs to bring your mobile apps to life

Multitouch Gestures• TransformGestureEvent.GESTURE_PAN

• event.offsetX

• event.offsetY

Page 13: Top AIR APIs to bring your mobile apps to life

Multitouch Gestures• TransformGestureEvent.GESTURE_ROTATE

• event.rotation

Page 14: Top AIR APIs to bring your mobile apps to life

Multitouch Gestures• TransformGestureEvent.GESTURE_ZOOM

• event.scaleX

• event.scaleY

Page 15: Top AIR APIs to bring your mobile apps to life

Camera

Page 16: Top AIR APIs to bring your mobile apps to life

Camera (CameraUI)

• CameraUI.isSupported

• CameraUI.launch(MediaType.*)

• MediaType.IMAGE, MediaType.VIDEO

• event.data.file.url

Page 17: Top AIR APIs to bring your mobile apps to life

Camera Roll

Page 18: Top AIR APIs to bring your mobile apps to life

Camera Roll - Browse

• CameraRoll.supportsBrowseForImage

• CameraRoll.browseForImage()

• event.data.file.url

Page 19: Top AIR APIs to bring your mobile apps to life

Camera Roll - Save

• CameraRoll.supportsAddBitmapData

• CameraRoll.addBitmapData(BitmapData)

• Event.COMPLETE, ErrorEvent.ERROR

Page 20: Top AIR APIs to bring your mobile apps to life

Microphone

Page 21: Top AIR APIs to bring your mobile apps to life

Microphone

• Microphone.isSupported

• Microphone.getMicrophone()

• Microphone.setSilenceLevel(silenceLevel, timeout)

• SampleDataEvent.SAMPLE_DATA

• Microphone.activityLevel

Page 22: Top AIR APIs to bring your mobile apps to life

Android

BlackBerry

iOS

Permissions

Page 23: Top AIR APIs to bring your mobile apps to life

Device Keys

Page 24: Top AIR APIs to bring your mobile apps to life

Device Keys

• applicationComplete

• stage.addEventListener(KeyboardEvent.KEY_DOWN)

• event.keyCode == Keyboard.BACK/MENU/SEARCH

• event.preventDefault()

Page 25: Top AIR APIs to bring your mobile apps to life

On Device Debugging

Page 26: Top AIR APIs to bring your mobile apps to life

DPI

Page 27: Top AIR APIs to bring your mobile apps to life

DPI

• What is it?

• Why is it important?

Page 28: Top AIR APIs to bring your mobile apps to life

DPI - Virtual Sizeobject.width = n pixels

object.height = n pixels

Page 29: Top AIR APIs to bring your mobile apps to life

DPI - Physical Sizeobject.width = Capabilities.screenDPI * physicalSizeInches

object.height = Capabilities.screenDPI * physicalSizeInches

Page 30: Top AIR APIs to bring your mobile apps to life

Multiplayer / Multi-user

• SocketServer Class

• Peer 2 Peer

Page 31: Top AIR APIs to bring your mobile apps to life

Peer 2 Peer

• Communicate across peers directly

• Establish initial connection and get a Peer ID

• Established via RTMFP

Page 32: Top AIR APIs to bring your mobile apps to life

ServerSocket

• Communicate via a network

• SocketServer class - Server

• Socket class - Client

Page 33: Top AIR APIs to bring your mobile apps to life

Questions?

Hemanth Sharmahttp://www.hsharma.com/tech

Twitter@hemanthsharma

Facebookwww.facebook.com/hemanth.sharma