top air apis to bring your mobile apps to life
DESCRIPTION
Get to know the most important APIs of Adobe AIR 2.6 that give you the expertise you need to build great apps for devices. Simple, yet powerful, APIs that give you access to device in ways which take your mobile apps to the next level. All the way from simple file access to accessing the Microphone, Geolocation, Accelerometer and many more features, this session will cover most of the APIs that are critical and experience booster for your AIR applications for multiple platforms and devices. Also learn the basics of creating multi-device, multiplayer apps and games using P2P and other multi-user interaction classes.TRANSCRIPT
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
What is Mobile?
• Experience
• Personalization
• Contextual
• Form Factor
Accelerometer
Accelerometer
• Accelerometer.isSupported
• event.accelerationX, event.accelerationY, event.accelerationZ
• event.timestamp
Geolocation
Geolocation
• Geolocation.isSupported
• event.latitude, event.longitude
• event.heading, event.speed, event.altitude
• event.horizontalAccuracy, event.verticalAccuracy
• event.timestamp
Multitouch
Multitouch
• Multitouch.supportsTouchEvents
• Multitouch.maxTouchPoints
• MultitouchInputMode.TOUCH_POINT
• TouchEvent.TOUCH_BEGIN, TouchEvent.TOUCH_END
• TouchEvent.TOUCH_MOVE, TouchEvent. TOUCH_TAP, etc.
Multitouch Gestures
Multitouch Gestures• Multitouch.supportsGestureEvents
• MultitouchInputMode.GESTURE
• TransformGestureEvent.GESTURE_SWIPE
• TransformGestureEvent.GESTURE_PAN
• TransformGestureEvent.GESTURE_ROTATE
• TransformGestureEvent.GESTURE_ZOOM
Multitouch Gestures• TransformGestureEvent.GESTURE_SWIPE
• event.offsetX
• event.offsetY
Multitouch Gestures• TransformGestureEvent.GESTURE_PAN
• event.offsetX
• event.offsetY
Multitouch Gestures• TransformGestureEvent.GESTURE_ROTATE
• event.rotation
Multitouch Gestures• TransformGestureEvent.GESTURE_ZOOM
• event.scaleX
• event.scaleY
Camera
Camera (CameraUI)
• CameraUI.isSupported
• CameraUI.launch(MediaType.*)
• MediaType.IMAGE, MediaType.VIDEO
• event.data.file.url
Camera Roll
Camera Roll - Browse
• CameraRoll.supportsBrowseForImage
• CameraRoll.browseForImage()
• event.data.file.url
Camera Roll - Save
• CameraRoll.supportsAddBitmapData
• CameraRoll.addBitmapData(BitmapData)
• Event.COMPLETE, ErrorEvent.ERROR
Microphone
Microphone
• Microphone.isSupported
• Microphone.getMicrophone()
• Microphone.setSilenceLevel(silenceLevel, timeout)
• SampleDataEvent.SAMPLE_DATA
• Microphone.activityLevel
Android
BlackBerry
iOS
Permissions
Device Keys
Device Keys
• applicationComplete
• stage.addEventListener(KeyboardEvent.KEY_DOWN)
• event.keyCode == Keyboard.BACK/MENU/SEARCH
• event.preventDefault()
On Device Debugging
DPI
DPI
• What is it?
• Why is it important?
DPI - Virtual Sizeobject.width = n pixels
object.height = n pixels
DPI - Physical Sizeobject.width = Capabilities.screenDPI * physicalSizeInches
object.height = Capabilities.screenDPI * physicalSizeInches
Multiplayer / Multi-user
• SocketServer Class
• Peer 2 Peer
Peer 2 Peer
• Communicate across peers directly
• Establish initial connection and get a Peer ID
• Established via RTMFP
ServerSocket
• Communicate via a network
• SocketServer class - Server
• Socket class - Client
Questions?
Hemanth Sharmahttp://www.hsharma.com/tech
Twitter@hemanthsharma
Facebookwww.facebook.com/hemanth.sharma