SlideShare a Scribd company logo
1 of 40
Download to read offline
Adobe AIR Development for the
          BlackBerry PlayBook




                            Feb 24, 20111
Agenda
•   Screen interactions
•   Device APIs to make great apps
    • Device integration
    • Offline storage
    • Event listeners
•   Skinning UI components
    • Themes
    • Skinstates
    • Methods of skinning
•   Resources and support




                                     2
Characteristics of the BlackBerry
    PlayBook
•   Seven inch screen size
•   Multi touch interface
•   Landscape or portrait display
•   Virtual keyboard




                                        4
Make a touch centric app
       User Action                    Result                    Type            Color
Drag or swipe from the top    This action displays the   application-specific    Red
      of the screen                    menu
 Drag or swipe from the       This action displays the      system-wide         Purple
  bottom of the screen               navigator
Drag or swipe from the left    This action switches         system-wide         Blue
    or right side of the           applications
           screen




                                                                                         5
On screen interactions
           User Action                                  Result
          Tap the screen                     Initiates an action in the app
                                      This action moves the content on the screen
                                               in the direction of the drag
 Drag or swipe across the screen
                                       or swipe and at the corresponding rate of
                                                          speed

                                          This action highlights a sequence of
Touch and hold a finger on an item.      characters, a word, a link, or an item
                                         such as an email message or picture.

                                       These actions zoom in to and out from an
    Pinch open or pinch close.
                                                        item




                                                                                  6
Notifications and Indicators
• Application notifies appear in the top left corner of the screen
  • Inform users about app-specific events such as new mail
     messages




• Status indicators appear in the top right corner of the screen
  • Display system status information such as battery power and
      wireless connection



                                                                     7
Adobe Runtimes – Flash Player & AIR



               AIR SDK         Tablet OS SDK




ActionScript                              BlackBerry PlayBook
                         SWF
                                            Application (.bar)
PlayBook AIR SDK Capabilities
•   Hardware acceleration
•   Web View to display HTML and Flash content
•   UI components built specifically for the touch screen
•   APIs for front and rear facing cameras, accelerometer, in-app
    payments and more
•   Application notifications




                                                                    9
PlayBook AIR SDK Capabilities
•   Extend Adobe AIR applications to use native C++ extensions
•   Porting existing Adobe AIR and Flash applications quickly and easily




                                                                           10
Bring existing AIR apps to the
BlackBerry PlayBook
•   Create the proper directory structure
•   Create the app.xml file
•   Package the SWF and app.xml file through the command line tool
•   Deploy to your BlackBerry PlayBook!




ActionScript                                       BlackBerry PlayBook
                            SWF
                                                     Application (.bar)
APIs to build great
apps

                      12
Adding a swipe gesture




                         13
Adding a swipe gesture




                         14
Device Information




                     15
Device Information
•   Battery level      • Capture battery
•   Battery state        events for app
•   Hardware ID          lifecycle
•   Device OS          • Identify your users
                         based on PIN
•   Device PIN
                       • Identify the Device
•   Platform Version     OS for functionality
•   Vendor ID




                                                16
Battery Level and Events



• Monitor battery levels for power consumption in your
  app
• Customize your app to provide the user experience
• Display battery and charging information from your app




                                                           17
Battery Level and Events




                           18
Database

•   SQLite is a in-process library that implements a self-contained,
    serverless, zero-configuration, transactional SQL database engine.
•   Data is stored in a file on the system, typical the developer stores it
    in File.applicationStorageDirectory.




                                                          DB
      PlayBook AIR Application                               File
AIR SQLite APIs

•   SQLConnection
    • open() – Synchronous
    • openAsync() – Asynchronous
    • loadSchema() – Database schema
    • Can Encrypt data on disk.
•   SQLStatement
    • text – SQL commands
    • execute()
•   SQLError
    • details/detailsID – SQL error message
    • operation – SQL command causing error
Shared Object
AIR File APIs
•   File
    • File.applicationStorageDirectory - a storage directory unique to each
         installed AIR application
    • File.applicationDirectory - the read-only directory where the
         application is installed (along with any installed assets)
    • File.desktopDirectory, File.documentsDirectory, File.userDirectory
    • Properties: exists, isDirectory, nativePath, extension, name, …
    • Methods: browseForOpen, browseForSave, getDirectoryListing(), …
•   FileStream
    • writeObject() – Uses AMF to write binary serialization of object.
    • open() – Synchronous
    • openAsync() – Asynchronous
Activity Indicator




• Provide visual progress
  feedback to the user
  during time-consuming
  operations


                            23
Event Listeners
Skinning QNX UI
Components

                  25
Skinning Basics
• Skin options
  • Global themes
  • Set specific component skins parts
• Skin states
• Methods of creating Skins
  • Bitmaps with or without scale grid
  • Display objects using graphics API
• QNX skin assets available for reuse




                                         26
PlayBook Themes
• PlayBook comes with 2 Themes: White (default) & Black




                                                          27
PlayBook Themes Example 2




                            28
ThemesGlobal




               29
Skin States

•   SkinStates.DISABLED
•   SkinStates.DISABLED_SELECTED
•   SkinStates.DOWN
•   SkinStates.DOWN_SELECTED
•   SkinStates.FOCUS
•   SkinStates.SELECTED
•   SkinStates.UP
•   SkinStates.UP_ODD



                                   30
Component Skin Parts
• ToggleSwitch                      • DropDown
    • setFillSkin()                     • setBackgroundSkin()
    • setThumbSkin()                    • setButtonSkin()
    • setTrackSkin()                    • setListSkin()




     • Button          • TextInput
        • setSkin()        • setSkin()




                                                         31
Setting a Skin

• Set skin method typically takes these types:
  • Class reference
  • String of qualified class name
  • DisplayObject instance




                                                 32
Bitmaps with Slice 9 Scaling
• Use Case: Custom TextInput image that scales




          Up/Down skin image   Focus skin image




                                                  33
Skin Code:


  OddShapeSkin.png



OddShapeSkinFocus.png




                        34
Drawing API
• Use Case: Custom TextInput with drawing API
  • Need to update any time the width/height changes




                                                       35
Skin Code:




             36
Skin Code:




             37
Resources & Support


                      38
Resources & Support
• BlackBerry Developer website
    •   http://us.blackberry.com/developers/tablet/devresources.jsp
    •   Webcast Series
    •   Docs
• BlackBerry Developer Forum
    •   http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-
        Adobe-AIR/bd-p/tablet
• BlackBerry Developer Blog
    •   http://devblog.blackberry.com/
• Adobe Labs
    •   http://labs.adobe.com/technologies/flash/blackberrytabos/

                                                                    39
Q&A
Thank You!




         Feb 24, 2011
                    40

More Related Content

What's hot

What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2
Joseph Labrecque
 
eXo overview Fev 2013. Introducing our new positioning.
eXo overview Fev 2013. Introducing our new positioning. eXo overview Fev 2013. Introducing our new positioning.
eXo overview Fev 2013. Introducing our new positioning.
Yann Aubry
 
Client Continuum Dec Fy09
Client Continuum Dec Fy09Client Continuum Dec Fy09
Client Continuum Dec Fy09
Martha Rotter
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
Chris Morrell
 
BlackBerry Basic
BlackBerry BasicBlackBerry Basic
BlackBerry Basic
Duy Do Phan
 
Terence Barr - what's new in m&e - 24mai2011
Terence Barr - what's new in m&e - 24mai2011Terence Barr - what's new in m&e - 24mai2011
Terence Barr - what's new in m&e - 24mai2011
Agora Group
 
Desarrollo con AIR para Playbook
Desarrollo con AIR para PlaybookDesarrollo con AIR para Playbook
Desarrollo con AIR para Playbook
Software Guru
 
Kony one studio technical training
Kony one studio technical trainingKony one studio technical training
Kony one studio technical training
Niranjan Kumar Reddy
 

What's hot (20)

What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2
 
Development Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElementsDevelopment Workshop on ET1, Android and Motorola RhoElements
Development Workshop on ET1, Android and Motorola RhoElements
 
WebWorks Development for BlackBerry PlayBook and Smartphones
WebWorks Development for BlackBerry PlayBook and SmartphonesWebWorks Development for BlackBerry PlayBook and Smartphones
WebWorks Development for BlackBerry PlayBook and Smartphones
 
S#01 김영욱
S#01 김영욱 S#01 김영욱
S#01 김영욱
 
eXo overview Fev 2013. Introducing our new positioning.
eXo overview Fev 2013. Introducing our new positioning. eXo overview Fev 2013. Introducing our new positioning.
eXo overview Fev 2013. Introducing our new positioning.
 
Sviluppare per una piattaforma mobile aperta: opportunità e sfide
Sviluppare per una piattaforma mobile aperta: opportunità e sfideSviluppare per una piattaforma mobile aperta: opportunità e sfide
Sviluppare per una piattaforma mobile aperta: opportunità e sfide
 
Android Development with Flash Platform
Android Development with Flash PlatformAndroid Development with Flash Platform
Android Development with Flash Platform
 
CA Plex on Apple Mac, iOS, Android
CA Plex on Apple Mac, iOS, AndroidCA Plex on Apple Mac, iOS, Android
CA Plex on Apple Mac, iOS, Android
 
Nokia Developer Offering Series 40
Nokia Developer Offering Series 40Nokia Developer Offering Series 40
Nokia Developer Offering Series 40
 
Client Continuum Dec Fy09
Client Continuum Dec Fy09Client Continuum Dec Fy09
Client Continuum Dec Fy09
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
Andriod ppt for colledge
Andriod ppt for colledgeAndriod ppt for colledge
Andriod ppt for colledge
 
Bring Your Android Apps to BlackBerry 10 in minutes
Bring Your Android Apps to BlackBerry 10 in minutesBring Your Android Apps to BlackBerry 10 in minutes
Bring Your Android Apps to BlackBerry 10 in minutes
 
BlackBerry Basic
BlackBerry BasicBlackBerry Basic
BlackBerry Basic
 
Terence Barr - what's new in m&e - 24mai2011
Terence Barr - what's new in m&e - 24mai2011Terence Barr - what's new in m&e - 24mai2011
Terence Barr - what's new in m&e - 24mai2011
 
Xamarin COE by Mukteswar Patnaik
Xamarin COE by Mukteswar PatnaikXamarin COE by Mukteswar Patnaik
Xamarin COE by Mukteswar Patnaik
 
Desarrollo con AIR para Playbook
Desarrollo con AIR para PlaybookDesarrollo con AIR para Playbook
Desarrollo con AIR para Playbook
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
DevBeat 2013 IBM Master Class presentation
DevBeat 2013 IBM Master Class presentationDevBeat 2013 IBM Master Class presentation
DevBeat 2013 IBM Master Class presentation
 
Kony one studio technical training
Kony one studio technical trainingKony one studio technical training
Kony one studio technical training
 

Viewers also liked (6)

Defending the Spread- Keep 'em Guessing
Defending the Spread- Keep 'em GuessingDefending the Spread- Keep 'em Guessing
Defending the Spread- Keep 'em Guessing
 
Applying-Pressure-33-Defense-John-Rice (1)
Applying-Pressure-33-Defense-John-Rice (1)Applying-Pressure-33-Defense-John-Rice (1)
Applying-Pressure-33-Defense-John-Rice (1)
 
33 Defense Understanding the Basics Rice
33 Defense Understanding the Basics Rice33 Defense Understanding the Basics Rice
33 Defense Understanding the Basics Rice
 
33 Defense - Understanding the Basics - John Rice
33 Defense - Understanding the Basics - John Rice33 Defense - Understanding the Basics - John Rice
33 Defense - Understanding the Basics - John Rice
 
Brian J King - Thesis Defense Presentation (Prior to giving) - Commercial Med...
Brian J King - Thesis Defense Presentation (Prior to giving) - Commercial Med...Brian J King - Thesis Defense Presentation (Prior to giving) - Commercial Med...
Brian J King - Thesis Defense Presentation (Prior to giving) - Commercial Med...
 
Building Your Digital Marketing Playbook
Building Your Digital Marketing PlaybookBuilding Your Digital Marketing Playbook
Building Your Digital Marketing Playbook
 

Similar to Adobe AIR Development for the BlackBerry PlayBook

Windows phone app development overview
Windows phone app development overviewWindows phone app development overview
Windows phone app development overview
Alan Mendelevich
 
Android application development
Android application developmentAndroid application development
Android application development
Linh Vi Tường
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
Joe Jacob
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
Imam Raza
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
drudolph11
 
Blackberry_runtime_for_android_apps
Blackberry_runtime_for_android_appsBlackberry_runtime_for_android_apps
Blackberry_runtime_for_android_apps
Droidcon Berlin
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
DuckMa
 

Similar to Adobe AIR Development for the BlackBerry PlayBook (20)

WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
 
Windows phone app development overview
Windows phone app development overviewWindows phone app development overview
Windows phone app development overview
 
Windows Phone Application development
Windows Phone Application developmentWindows Phone Application development
Windows Phone Application development
 
Android application development
Android application developmentAndroid application development
Android application development
 
Introduction to Android for Quality Engineers
Introduction to Android for Quality EngineersIntroduction to Android for Quality Engineers
Introduction to Android for Quality Engineers
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
 
Android part1
Android part1Android part1
Android part1
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
 
Android Mobile App Development basics PPT
Android Mobile App Development basics PPTAndroid Mobile App Development basics PPT
Android Mobile App Development basics PPT
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
 
ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile...
ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile...ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile...
ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile...
 
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF MobileADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
 
Build Your First Android App Session #1
Build Your First Android App Session #1Build Your First Android App Session #1
Build Your First Android App Session #1
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
 
Android class provider in mumbai
Android class provider in mumbaiAndroid class provider in mumbai
Android class provider in mumbai
 
Blackberry_runtime_for_android_apps
Blackberry_runtime_for_android_appsBlackberry_runtime_for_android_apps
Blackberry_runtime_for_android_apps
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
The Developers World
The Developers WorldThe Developers World
The Developers World
 
Mobile Application Development with ANDROID
Mobile Application Development with ANDROIDMobile Application Development with ANDROID
Mobile Application Development with ANDROID
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Adobe AIR Development for the BlackBerry PlayBook

  • 1. Adobe AIR Development for the BlackBerry PlayBook Feb 24, 20111
  • 2. Agenda • Screen interactions • Device APIs to make great apps • Device integration • Offline storage • Event listeners • Skinning UI components • Themes • Skinstates • Methods of skinning • Resources and support 2
  • 3.
  • 4. Characteristics of the BlackBerry PlayBook • Seven inch screen size • Multi touch interface • Landscape or portrait display • Virtual keyboard 4
  • 5. Make a touch centric app User Action Result Type Color Drag or swipe from the top This action displays the application-specific Red of the screen menu Drag or swipe from the This action displays the system-wide Purple bottom of the screen navigator Drag or swipe from the left This action switches system-wide Blue or right side of the applications screen 5
  • 6. On screen interactions User Action Result Tap the screen Initiates an action in the app This action moves the content on the screen in the direction of the drag Drag or swipe across the screen or swipe and at the corresponding rate of speed This action highlights a sequence of Touch and hold a finger on an item. characters, a word, a link, or an item such as an email message or picture. These actions zoom in to and out from an Pinch open or pinch close. item 6
  • 7. Notifications and Indicators • Application notifies appear in the top left corner of the screen • Inform users about app-specific events such as new mail messages • Status indicators appear in the top right corner of the screen • Display system status information such as battery power and wireless connection 7
  • 8. Adobe Runtimes – Flash Player & AIR AIR SDK Tablet OS SDK ActionScript BlackBerry PlayBook SWF Application (.bar)
  • 9. PlayBook AIR SDK Capabilities • Hardware acceleration • Web View to display HTML and Flash content • UI components built specifically for the touch screen • APIs for front and rear facing cameras, accelerometer, in-app payments and more • Application notifications 9
  • 10. PlayBook AIR SDK Capabilities • Extend Adobe AIR applications to use native C++ extensions • Porting existing Adobe AIR and Flash applications quickly and easily 10
  • 11. Bring existing AIR apps to the BlackBerry PlayBook • Create the proper directory structure • Create the app.xml file • Package the SWF and app.xml file through the command line tool • Deploy to your BlackBerry PlayBook! ActionScript BlackBerry PlayBook SWF Application (.bar)
  • 12. APIs to build great apps 12
  • 13. Adding a swipe gesture 13
  • 14. Adding a swipe gesture 14
  • 16. Device Information • Battery level • Capture battery • Battery state events for app • Hardware ID lifecycle • Device OS • Identify your users based on PIN • Device PIN • Identify the Device • Platform Version OS for functionality • Vendor ID 16
  • 17. Battery Level and Events • Monitor battery levels for power consumption in your app • Customize your app to provide the user experience • Display battery and charging information from your app 17
  • 18. Battery Level and Events 18
  • 19. Database • SQLite is a in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. • Data is stored in a file on the system, typical the developer stores it in File.applicationStorageDirectory. DB PlayBook AIR Application File
  • 20. AIR SQLite APIs • SQLConnection • open() – Synchronous • openAsync() – Asynchronous • loadSchema() – Database schema • Can Encrypt data on disk. • SQLStatement • text – SQL commands • execute() • SQLError • details/detailsID – SQL error message • operation – SQL command causing error
  • 22. AIR File APIs • File • File.applicationStorageDirectory - a storage directory unique to each installed AIR application • File.applicationDirectory - the read-only directory where the application is installed (along with any installed assets) • File.desktopDirectory, File.documentsDirectory, File.userDirectory • Properties: exists, isDirectory, nativePath, extension, name, … • Methods: browseForOpen, browseForSave, getDirectoryListing(), … • FileStream • writeObject() – Uses AMF to write binary serialization of object. • open() – Synchronous • openAsync() – Asynchronous
  • 23. Activity Indicator • Provide visual progress feedback to the user during time-consuming operations 23
  • 26. Skinning Basics • Skin options • Global themes • Set specific component skins parts • Skin states • Methods of creating Skins • Bitmaps with or without scale grid • Display objects using graphics API • QNX skin assets available for reuse 26
  • 27. PlayBook Themes • PlayBook comes with 2 Themes: White (default) & Black 27
  • 30. Skin States • SkinStates.DISABLED • SkinStates.DISABLED_SELECTED • SkinStates.DOWN • SkinStates.DOWN_SELECTED • SkinStates.FOCUS • SkinStates.SELECTED • SkinStates.UP • SkinStates.UP_ODD 30
  • 31. Component Skin Parts • ToggleSwitch • DropDown • setFillSkin() • setBackgroundSkin() • setThumbSkin() • setButtonSkin() • setTrackSkin() • setListSkin() • Button • TextInput • setSkin() • setSkin() 31
  • 32. Setting a Skin • Set skin method typically takes these types: • Class reference • String of qualified class name • DisplayObject instance 32
  • 33. Bitmaps with Slice 9 Scaling • Use Case: Custom TextInput image that scales Up/Down skin image Focus skin image 33
  • 34. Skin Code: OddShapeSkin.png OddShapeSkinFocus.png 34
  • 35. Drawing API • Use Case: Custom TextInput with drawing API • Need to update any time the width/height changes 35
  • 39. Resources & Support • BlackBerry Developer website • http://us.blackberry.com/developers/tablet/devresources.jsp • Webcast Series • Docs • BlackBerry Developer Forum • http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for- Adobe-AIR/bd-p/tablet • BlackBerry Developer Blog • http://devblog.blackberry.com/ • Adobe Labs • http://labs.adobe.com/technologies/flash/blackberrytabos/ 39
  • 40. Q&A Thank You! Feb 24, 2011 40