Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Top AIR APIs to bring your mobile apps to life

5,115 views

Published on

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.

Published in: Technology
  • Be the first to comment

Top AIR APIs to bring your mobile apps to life

  1. 1. Bring your Mobile Apps to life! Hemanth Sharma Twitter: www.twitter.com/hemanthsharma Platform EvangelistFacebook: www.facebook.com/hemanth.sharma Adobe Systems Inc. Blog: www.hsharma.com/tech
  2. 2. What is Mobile?• Experience• Personalization• Contextual• Form Factor
  3. 3. Accelerometer
  4. 4. Accelerometer• Accelerometer.isSupported• event.accelerationX, event.accelerationY, event.accelerationZ• event.timestamp
  5. 5. Geolocation
  6. 6. Geolocation• Geolocation.isSupported• event.latitude, event.longitude• event.heading, event.speed, event.altitude• event.horizontalAccuracy, event.verticalAccuracy• event.timestamp
  7. 7. Multitouch
  8. 8. Multitouch• Multitouch.supportsTouchEvents• Multitouch.maxTouchPoints• MultitouchInputMode.TOUCH_POINT• TouchEvent.TOUCH_BEGIN, TouchEvent.TOUCH_END• TouchEvent.TOUCH_MOVE, TouchEvent. TOUCH_TAP, etc.
  9. 9. Multitouch Gestures
  10. 10. Multitouch Gestures• Multitouch.supportsGestureEvents• MultitouchInputMode.GESTURE• TransformGestureEvent.GESTURE_SWIPE• TransformGestureEvent.GESTURE_PAN• TransformGestureEvent.GESTURE_ROTATE• TransformGestureEvent.GESTURE_ZOOM
  11. 11. Multitouch Gestures• TransformGestureEvent.GESTURE_SWIPE • event.offsetX • event.offsetY
  12. 12. Multitouch Gestures• TransformGestureEvent.GESTURE_PAN • event.offsetX • event.offsetY
  13. 13. Multitouch Gestures• TransformGestureEvent.GESTURE_ROTATE • event.rotation
  14. 14. Multitouch Gestures• TransformGestureEvent.GESTURE_ZOOM • event.scaleX • event.scaleY
  15. 15. Camera
  16. 16. Camera (CameraUI)• CameraUI.isSupported• CameraUI.launch(MediaType.*)• MediaType.IMAGE, MediaType.VIDEO• event.data.file.url
  17. 17. Camera Roll
  18. 18. Camera Roll - Browse• CameraRoll.supportsBrowseForImage• CameraRoll.browseForImage()• event.data.file.url
  19. 19. Camera Roll - Save• CameraRoll.supportsAddBitmapData• CameraRoll.addBitmapData(BitmapData)• Event.COMPLETE, ErrorEvent.ERROR
  20. 20. Microphone
  21. 21. Microphone• Microphone.isSupported• Microphone.getMicrophone()• Microphone.setSilenceLevel(silenceLevel, timeout)• SampleDataEvent.SAMPLE_DATA• Microphone.activityLevel
  22. 22. Permissions Android BlackBerry iOS
  23. 23. Device Keys
  24. 24. Device Keys• applicationComplete• stage.addEventListener(KeyboardEvent.KEY_DOWN)• event.keyCode == Keyboard.BACK/MENU/SEARCH• event.preventDefault()
  25. 25. On Device Debugging
  26. 26. DPI
  27. 27. DPI• What is it?• Why is it important?
  28. 28. DPI - Virtual Size object.width = n pixels object.height = n pixels
  29. 29. DPI - Physical Size object.width = Capabilities.screenDPI * physicalSizeInches object.height = Capabilities.screenDPI * physicalSizeInches
  30. 30. Multiplayer / Multi-user• SocketServer Class• Peer 2 Peer
  31. 31. Peer 2 Peer• Communicate across peers directly• Establish initial connection and get a Peer ID• Established via RTMFP
  32. 32. ServerSocket• Communicate via a network• SocketServer class - Server• Socket class - Client
  33. 33. Questions? Hemanth Sharma http://www.hsharma.com/tech Twitter @hemanthsharma Facebook www.facebook.com/hemanth.sharma

×