SlideShare a Scribd company logo
1 of 42
Introduction to Module
     Development
       Aaron K. Saunders
          Founder/CTO
       Clearly Innovative Inc
        @aaronksaunders

    aaron@clearlyinnovative.com
About Me




           • Founder & CTO Clearly Innovative Inc.
           • Full stack development for mobile and
             web integrations w/javascript & nodejs
           • Appcelerator Platform Evangelist; Titan
           • IOS and Android Module Development
           • 2yrs of Appcelerator blogging
           • Working on book with ACS and Alloy
             Integration
What this
presentation is about
Android Topics


                 • Introduction to module
                   development, not advanced

                 • Basic integration of third party library
                   and intent based library

                 • Understand the Titanium Studio Menu
                   commands for scripts

                 • Understanding Ant build script on
                   Android
IOS Topics


             • Introduction to module
               development, not advanced

             • Basic integration of third party library

             • Understand the Titanium Studio Menu
               commands for scripts

             • Understanding command line scripts
What this
presentation is not
about
Out of Scope


               • Advanced view integration in modules

               • Additional information on NDK
                 integration on Android

               • Addressing complex third party library
                 conflicts on IOS
Android first because
it needs some love
Your Environment


              • Instructions on the wiki are your best
                starting point

              • Use the commands provided in
                Titanium Studio

              • Be sure you have followed instructions
                for setting up Titanium Studio
                 • Installing Java Development Tools
Android Module
Quickly
Create Android
Module           • Select “New Titanium
                   Mobile Module Project”
                   from Menu

                 • Fill out all of the fields
                   presented

                 • Save the project

                 • Edit the build.properties
                   to point to the
                   ANDROID_NDK path

                 • Run project
Run through script on
device
Add some
functionality
Skyhook SDK
Integration Steps


                • Import 3rd party library
                • Pass authentication credentials into
                  module
                • Setup callbacks in module
                • Pass results back from module
                • Render results
Edit app.js


              • Instantiate the module object

              • Create a proxy object

              • Provide credentials to module

              • Setup success and error callback

              • Execute API method on proxy object
Edit app.js
Edit module file


                   • Remove the template method calls
                     generated by script

                   • Create property for the username

                   • Create property for realm
Edit module file
Edit proxy file


                  • Get properties for username and
                    realm; framework does most of the
                    heavy lifting for you

                  • Get the callback functions from the
                    passed in parameters
Edit proxy file
Edit proxy file
Edit proxy file


                  • So now we have all the data in… We
                    need to get the data out

                  • Create hashMap, add the objects and
                    call our callback
Code for completed
module
IOS module
Your Environment


              • Instructions on the wiki are your best
                starting point

              • Use the commands provided in
                Titanium Studio

              • Be sure you have followed instructions
                for setting up Titanium Studio
                 • Installing IOS & Xcode
                    Development Tools
Card.io SDK
Integration Steps


                •   Import 3rd party library
                •   Pass application key into module
                •   Setup callbacks in module
                •   Pass results back from module
                •   Render results
Libraries &
Headers
Edit app.js


              • Instantiate the module object

              • Provide application key to module

              • Setup success and error callback

              • Execute API method on module
Edit app.js
Edit header file


                   • Set the interface for the card.io
                     delegate

                   • Set up private variable for the function
                     callback with success or error
                     information
Edit header file
Edit module file


                   • Remove the template method calls
                     generated by script

                   • Make sure we de-allocate any
                     memory that we have allocated

                   • Get the parameters from the
                     javascript passed into objective-c

                   • Make card.io API call to display card
                     capture information
Edit module file
Edit module file


                   • Handle the response from the UI after
                     it is rendered

                   • Handle the two delegates from API for
                     user cancel or data entered

                   • Pass a new hashmap containing
                     results back to the javascript app
Edit module file
Edit module file
OVERLOAD!!


             • Blog posting next two weeks

             • All code provided on github

             • Additional Intent based module
               included
Aaron K. Saunders
     @aaronksaunders

aaron@clearlyinnovative.com
 blog.clearlyinnovative.com

More Related Content

What's hot

iOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomeriOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomerAndri Yadi
 
Visual Studio2010 Product Overview
Visual Studio2010 Product OverviewVisual Studio2010 Product Overview
Visual Studio2010 Product Overviewjanadbest
 
IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016Trayan Iliev
 
L0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-inL0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-inTonny Madsen
 
Live Content: Finding new ways to publish
Live Content: Finding new ways to publishLive Content: Finding new ways to publish
Live Content: Finding new ways to publishckimrie
 
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)mikaelbarbero
 
Rapid application development con titanium appcelerator
Rapid application development con titanium appceleratorRapid application development con titanium appcelerator
Rapid application development con titanium appceleratorGiorgio Mandolini
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesVMware Tanzu
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEBenjamin Cabé
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Mikkel Flindt Heisterberg
 
15 android libraries for app development
15 android libraries for app development15 android libraries for app development
15 android libraries for app developmentConcetto Labs
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A NutshellTed Chien
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
Top React Native Developer Tools and Component Libraries (For Easy and Speedy...
Top React Native Developer Tools and Component Libraries (For Easy and Speedy...Top React Native Developer Tools and Component Libraries (For Easy and Speedy...
Top React Native Developer Tools and Component Libraries (For Easy and Speedy...Katy Slemon
 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework IntroductionAnuj Singh Rajput
 
DSDP Mobile Tools for Java Webinar
DSDP Mobile Tools for Java WebinarDSDP Mobile Tools for Java Webinar
DSDP Mobile Tools for Java Webinargustavoeliano
 

What's hot (19)

iOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for JasakomeriOS Development - Offline Class for Jasakomer
iOS Development - Offline Class for Jasakomer
 
Visual Studio2010 Product Overview
Visual Studio2010 Product OverviewVisual Studio2010 Product Overview
Visual Studio2010 Product Overview
 
IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016
 
Android cours
Android coursAndroid cours
Android cours
 
Mono for android
Mono for androidMono for android
Mono for android
 
L0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-inL0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-in
 
Live Content: Finding new ways to publish
Live Content: Finding new ways to publishLive Content: Finding new ways to publish
Live Content: Finding new ways to publish
 
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
 
Rapid application development con titanium appcelerator
Rapid application development con titanium appceleratorRapid application development con titanium appcelerator
Rapid application development con titanium appcelerator
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)
 
15 android libraries for app development
15 android libraries for app development15 android libraries for app development
15 android libraries for app development
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
Top React Native Developer Tools and Component Libraries (For Easy and Speedy...
Top React Native Developer Tools and Component Libraries (For Easy and Speedy...Top React Native Developer Tools and Component Libraries (For Easy and Speedy...
Top React Native Developer Tools and Component Libraries (For Easy and Speedy...
 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework Introduction
 
Coding Naked
Coding NakedCoding Naked
Coding Naked
 
DSDP Mobile Tools for Java Webinar
DSDP Mobile Tools for Java WebinarDSDP Mobile Tools for Java Webinar
DSDP Mobile Tools for Java Webinar
 

Similar to Introduction to Module Development with Appcelerator Titanium

CI in the mobile world
CI in the mobile worldCI in the mobile world
CI in the mobile worldGodfrey Nolan
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireJeff Fox
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixPeter Nazarov
 
Real World Windows Phone Development
Real World Windows Phone DevelopmentReal World Windows Phone Development
Real World Windows Phone DevelopmentIgor Kulman
 
Philly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With SwiftPhilly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With SwiftJordan Yaker
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI InteropRay Ploski
 
Why Upgrade to v8.6?
Why Upgrade to v8.6?Why Upgrade to v8.6?
Why Upgrade to v8.6?BillCavaUs
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Building Papers
Building PapersBuilding Papers
Building PapersMahmoud
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy wayJohn Azariah
 
SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"Inhacking
 
Continuous delivery @ iyzico
Continuous delivery @ iyzicoContinuous delivery @ iyzico
Continuous delivery @ iyzicoÜmit Ünal
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Perficient, Inc.
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms BootcampMike Melusky
 
Infinum android talks_10_android_libraries_used_on_daily_basis
Infinum android talks_10_android_libraries_used_on_daily_basisInfinum android talks_10_android_libraries_used_on_daily_basis
Infinum android talks_10_android_libraries_used_on_daily_basisInfinum
 

Similar to Introduction to Module Development with Appcelerator Titanium (20)

CI in the mobile world
CI in the mobile worldCI in the mobile world
CI in the mobile world
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter Bonfire
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
77402_VishalLaljeet
77402_VishalLaljeet77402_VishalLaljeet
77402_VishalLaljeet
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Real World Windows Phone Development
Real World Windows Phone DevelopmentReal World Windows Phone Development
Real World Windows Phone Development
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Philly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With SwiftPhilly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With Swift
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI Interop
 
Why Upgrade to v8.6?
Why Upgrade to v8.6?Why Upgrade to v8.6?
Why Upgrade to v8.6?
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Building Papers
Building PapersBuilding Papers
Building Papers
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy way
 
SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"
 
Alex Theedom Java ee revisits design patterns
Alex Theedom	Java ee revisits design patternsAlex Theedom	Java ee revisits design patterns
Alex Theedom Java ee revisits design patterns
 
Continuous delivery @ iyzico
Continuous delivery @ iyzicoContinuous delivery @ iyzico
Continuous delivery @ iyzico
 
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 
Infinum android talks_10_android_libraries_used_on_daily_basis
Infinum android talks_10_android_libraries_used_on_daily_basisInfinum android talks_10_android_libraries_used_on_daily_basis
Infinum android talks_10_android_libraries_used_on_daily_basis
 

More from Aaron Saunders

Mobile Application Workshop - So You Want To Build a Mobile App?
Mobile Application Workshop - So You Want To Build a Mobile App?Mobile Application Workshop - So You Want To Build a Mobile App?
Mobile Application Workshop - So You Want To Build a Mobile App?Aaron Saunders
 
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...Aaron Saunders
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAppcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAaron Saunders
 
Identify & Unlock Your Mobile Strategy
Identify & Unlock Your Mobile StrategyIdentify & Unlock Your Mobile Strategy
Identify & Unlock Your Mobile StrategyAaron Saunders
 
SubAid User Guide - Overview
SubAid User Guide - OverviewSubAid User Guide - Overview
SubAid User Guide - OverviewAaron Saunders
 
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...Aaron Saunders
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Aaron Saunders
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumAaron Saunders
 
Simple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium AlloySimple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium AlloyAaron Saunders
 
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013Aaron Saunders
 
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services Presentationmodeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services PresentationAaron Saunders
 
Alloy Simple App Demonstration
Alloy Simple App DemonstrationAlloy Simple App Demonstration
Alloy Simple App DemonstrationAaron Saunders
 
Clearly Innovative Inc Capabilities
Clearly Innovative Inc CapabilitiesClearly Innovative Inc Capabilities
Clearly Innovative Inc CapabilitiesAaron Saunders
 
PaaS + Appcelerator = WIN
PaaS + Appcelerator = WINPaaS + Appcelerator = WIN
PaaS + Appcelerator = WINAaron Saunders
 
StackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneStackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneAaron Saunders
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 

More from Aaron Saunders (16)

Mobile Application Workshop - So You Want To Build a Mobile App?
Mobile Application Workshop - So You Want To Build a Mobile App?Mobile Application Workshop - So You Want To Build a Mobile App?
Mobile Application Workshop - So You Want To Build a Mobile App?
 
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAppcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
 
Identify & Unlock Your Mobile Strategy
Identify & Unlock Your Mobile StrategyIdentify & Unlock Your Mobile Strategy
Identify & Unlock Your Mobile Strategy
 
SubAid User Guide - Overview
SubAid User Guide - OverviewSubAid User Guide - Overview
SubAid User Guide - Overview
 
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator Titanium
 
Simple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium AlloySimple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium Alloy
 
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
 
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services Presentationmodeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
 
Alloy Simple App Demonstration
Alloy Simple App DemonstrationAlloy Simple App Demonstration
Alloy Simple App Demonstration
 
Clearly Innovative Inc Capabilities
Clearly Innovative Inc CapabilitiesClearly Innovative Inc Capabilities
Clearly Innovative Inc Capabilities
 
PaaS + Appcelerator = WIN
PaaS + Appcelerator = WINPaaS + Appcelerator = WIN
PaaS + Appcelerator = WIN
 
StackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneStackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part One
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 

Introduction to Module Development with Appcelerator Titanium

  • 1. Introduction to Module Development Aaron K. Saunders Founder/CTO Clearly Innovative Inc @aaronksaunders aaron@clearlyinnovative.com
  • 2. About Me • Founder & CTO Clearly Innovative Inc. • Full stack development for mobile and web integrations w/javascript & nodejs • Appcelerator Platform Evangelist; Titan • IOS and Android Module Development • 2yrs of Appcelerator blogging • Working on book with ACS and Alloy Integration
  • 4. Android Topics • Introduction to module development, not advanced • Basic integration of third party library and intent based library • Understand the Titanium Studio Menu commands for scripts • Understanding Ant build script on Android
  • 5. IOS Topics • Introduction to module development, not advanced • Basic integration of third party library • Understand the Titanium Studio Menu commands for scripts • Understanding command line scripts
  • 7. Out of Scope • Advanced view integration in modules • Additional information on NDK integration on Android • Addressing complex third party library conflicts on IOS
  • 8. Android first because it needs some love
  • 9. Your Environment • Instructions on the wiki are your best starting point • Use the commands provided in Titanium Studio • Be sure you have followed instructions for setting up Titanium Studio • Installing Java Development Tools
  • 11. Create Android Module • Select “New Titanium Mobile Module Project” from Menu • Fill out all of the fields presented • Save the project • Edit the build.properties to point to the ANDROID_NDK path • Run project
  • 12. Run through script on device
  • 15. Integration Steps • Import 3rd party library • Pass authentication credentials into module • Setup callbacks in module • Pass results back from module • Render results
  • 16. Edit app.js • Instantiate the module object • Create a proxy object • Provide credentials to module • Setup success and error callback • Execute API method on proxy object
  • 18. Edit module file • Remove the template method calls generated by script • Create property for the username • Create property for realm
  • 20. Edit proxy file • Get properties for username and realm; framework does most of the heavy lifting for you • Get the callback functions from the passed in parameters
  • 23. Edit proxy file • So now we have all the data in… We need to get the data out • Create hashMap, add the objects and call our callback
  • 24.
  • 27. Your Environment • Instructions on the wiki are your best starting point • Use the commands provided in Titanium Studio • Be sure you have followed instructions for setting up Titanium Studio • Installing IOS & Xcode Development Tools
  • 29. Integration Steps • Import 3rd party library • Pass application key into module • Setup callbacks in module • Pass results back from module • Render results
  • 31. Edit app.js • Instantiate the module object • Provide application key to module • Setup success and error callback • Execute API method on module
  • 33. Edit header file • Set the interface for the card.io delegate • Set up private variable for the function callback with success or error information
  • 35. Edit module file • Remove the template method calls generated by script • Make sure we de-allocate any memory that we have allocated • Get the parameters from the javascript passed into objective-c • Make card.io API call to display card capture information
  • 37. Edit module file • Handle the response from the UI after it is rendered • Handle the two delegates from API for user cancel or data entered • Pass a new hashmap containing results back to the javascript app
  • 40. OVERLOAD!! • Blog posting next two weeks • All code provided on github • Additional Intent based module included
  • 41.
  • 42. Aaron K. Saunders @aaronksaunders aaron@clearlyinnovative.com blog.clearlyinnovative.com