VIDEO: http://bit.ly/P1UlGr starts at 1:13
Overview of creating modules with Appcelerator Titanium. We integrate SkyhookWireless location SDK and Card.io mobile card sdk
Source:
Source code for ios cardio module presented at @codestrong http://bit.ly/PQlsW9
Source code for android skyhookwireless module presented at @codestrong http://bit.ly/z4zfdl
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
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
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
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
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
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