SlideShare a Scribd company logo
Titanium+Plus Modules and Javascript Bridges: Controlling Hardware with a Web Language




                           Rob Chohan
                  Chief Technologist, ePi Rational
                           (C) 2011 ePi Rational, LLC
Rob Chohan: Titanium+Plus Modules and Javascript Bridges: Controlling Hardware with a Web Language
2001: A Space Odyssey
   Start around 57'20''
Streaming BBC Channel 12 to Space
Sweet Spot = Hardware + Software + Content
Mobile Architecture,
extending Titanium example

  One Barcode app idea to rule them all!!!



                                  Titanium –
                                  Open source User Interface
                                  & Hardware API Library

(Software to be written to tie these together)


                                  Zxing or Zebra Crossing –
                                  Open source barcode library
                                  encode/decode



           iOS         Android


    Killer Barcode App = Camera +
Libraries that are ripe for
                     Titanium+Plus
• DropBox                           • My Tracks, Map or Lat/Long?
                                                      -117.117203,   32.784180
• Airpush                                             -117.116966,
                                                      -117.116501,
                                                                     32.784218
                                                                     32.784386
                                                      -117.116501,   32.784439
                                                      -117.116341,   32.784527
• Square                                              -117.116280,   32.784618



• Networking

• Google Analytics*


• A cryptographically secure RNG
  that your app needs that
  Javascript can't provide (e.g.,
  SecureRandom)
How To:
               Appcelerator makes it easy
                     to get started




•   Titanium generates stubs
•   From their it is up to you to fill in the blanks
•   Pull in your favorite JAR, Java, or Obj-C or C++ code
•   Build and distribute on the Appcelerator Marketplace
Hardware that could be
          interesting to Titanium
                Developers

• Barometer

• WiFi

• Bluetooth

• Near Field Communications (NFC)

• ANT+

• GPS
Barometer



• Motorola chose a   What is a Barometer good for
  Digital Pressure   (courtesy of the chip manufacturer, Bosch)

  Sensor in their    • Enhancement of GPS
  Motorola Xoom        navigation
                     • Indoor and outdoor
                       navigation
                     • Leisure and sports
                     • Weather forecast
                     • Vertical velocity indication
Barometer,
                Javascript example


• This is a perfect example of how Titanium+Plus can be extended
• Barometer usage (targeting Motorola XOOM)

var baro = require('epi.baro');
data = baro.getBaro();  // in milliBars, of course
Titanium+Module Implementation for
             a Barometer on Android
public void onSensorChanged(SensorEvent event) {
long curTime = System.currentTimeMillis();
    switch (event.sensor.getType()) {
      case Sensor.TYPE_PRESSURE:
        if (lastUpdate == -1 || (curTime - lastUpdate) > mTime){ 
          float pressure = event.values[0];
        }
        break;
        
      case Sensor.TYPE_ACCELEROMETER:
        if (lastUpdate == -1 || (curTime - lastUpdate) > mTime){  
          float x = event.values[0];
          float y = event.values[1];
          float z = event.values[2];
        }
        break;
    }
}
Screen from Motorola Xoom, Native App by Noosters
       500+ Downloads as of Sep 2011
Screen from Motorola Xoom, Native App by Guild Software
        5,000+ Downloads as of Sep 2011
Screen from Motorola Xoom, Native App by David Momenso
         100+ Downloads as of Sep 2011
Titanium+Plus Modules
 helps to lower the bar
Data Mining on Android
         Bluetooth Hardware Apps,
         Data mined from AndBOT.com, April 2011



•   Bluetooth   Samples
•   Bluetooth   Bar Widget
•   Bluetooth   Backport for pre-Android 2.0
•   Bluetooth   Fileshare - Bluex
•   Bluetooth   On/Off for Droid
•   Bluetooth   Remote
•   Bluetooth   text & paint Chat
•   Bluetooth   Terminal
•   Bluetooth   Widget

Very useful apps, but what else can be done?
Bluetooth now becomes
          very interesting for
            Titanium Users

What is a Bluetooth good for in the context
of Titanium
 • Chat programs
 • Getting data from custom sensor
   boards

var btLib = require('epi.bt');
bt = btLib.turnOnRadio();  
// discovery
bt.discovery();
// pairing
// exchanging of data
San Diego Based Fitness Startup



• San Diego based startup         Mobile Phone
  focusing on Bicycle fitness
• Patent pending nutrition and
  hydration algorithm for
  cyclists
• 100% bootstrapped
• Developed a custom sensor
  board with
   o wheel revolution counters
   o digital pressure barometer
   o another type of pressure
     sensor
   o Bluetooth 3 radio            Custom Device
                                  comm over Bluetooth
San Diego Based Fitness Startup
                  why Titanium worked for them




• 100% bootstrapped                              Mobile Phone
• team is comprised of
   o 1 firmware
   o 1 electrical engineer
   o 1 Titanium Dev
   o 1 Bluetooth Dev
   o 1 Marketing
• Each team member was
  able to focus on their
  particular part
• Team currently at funding
  stage
                                                 Custom Device
                                                 comm over Bluetooth
Bluetooth on Android &
       Titanium+Plus



• Android module built for
  Android 1.6                    • Many pitfalls
                                    o older firmware and Android
• Relies on the Bluetooth             phones (wait for supported
                                      hardware!)
  Backport open source jar          o building for Titanium
  from Sosuke Masui, Japan            required modifying the
                                      Python build scripts for both
• Development was started back        the Module and the
  before Bluetooth was                Application
                                    o Android resources!!!,
  supported on Android 2.0
                                      created a two-step build
                                      process
                                    o Port to iOS coming after
                                      funding
Localization Notes on
          Titanium+Plus with Android
• Android res files for each locale (en, ja, es, ...)
Titanium+Plus Modules and Javascript Bridges: Controlling Hardware with a Web Language




                     Rob Chohan
            Chief Technologist, ePi Rational
                      (C) 2011 ePi Rational, LLC

More Related Content

PDF
DEFCON 23 - Ian Latter - remote access the apt
PPT
Experiences from the Valley
PDF
Fred Spencer: Designing a Great UI
ZIP
How to use Mobile Applications to extend your brand
PPTX
Settlement
PDF
Scott Schwarzhoff: Building Wildly Successful Apps on Titanium
PPS
Lunchtime seminar 11 s abd v2
DEFCON 23 - Ian Latter - remote access the apt
Experiences from the Valley
Fred Spencer: Designing a Great UI
How to use Mobile Applications to extend your brand
Settlement
Scott Schwarzhoff: Building Wildly Successful Apps on Titanium
Lunchtime seminar 11 s abd v2

Viewers also liked (12)

PDF
Jeff Haynie: Building World Class Mobile Experiences on Titanium
PPT
International Salvage Union - Piracy; Shifting Tides
PDF
Titanium Mobile
PPT
Lunchtime seminar 11 abd v2
PPTX
Titanium Mobile 1.8 for Module Developers
PDF
The Roost
PDF
ALS Zertifikat
PPTX
20150813公共工程委員會:「104年度上半年公共建設推動辦理情形」報告
PDF
VivekKumar_Resume
PDF
Personal Health and Finance Quiz
PDF
Mazda3
DOCX
LATEST RESUME BIREN 15OCT 2016 RESUME
Jeff Haynie: Building World Class Mobile Experiences on Titanium
International Salvage Union - Piracy; Shifting Tides
Titanium Mobile
Lunchtime seminar 11 abd v2
Titanium Mobile 1.8 for Module Developers
The Roost
ALS Zertifikat
20150813公共工程委員會:「104年度上半年公共建設推動辦理情形」報告
VivekKumar_Resume
Personal Health and Finance Quiz
Mazda3
LATEST RESUME BIREN 15OCT 2016 RESUME
Ad

Similar to Rob Chohan: Titanium+Plus Modules and Javascript Bridges: Controlling Hardware with a Web Language (20)

PPTX
Appcelerator Titanium Intro
PDF
Introduction to Appcelerator Titanium
PDF
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
PDF
Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015
PDF
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
PPTX
Teksun Corporate Overview 2014
PDF
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
PPTX
LPWAN Cost Webinar
PDF
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
PDF
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
PPTX
Internet of Things 101 - Part II
KEY
콘텐츠 플랫폼 구조 분석
PDF
Building the Ultimate Device Matrix
KEY
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
KEY
CommNexus San Diego Presentation
ZIP
Introducing Titanium
PPTX
tiConf (la dediff)
PPTX
DESIGN West 2013 Presentation: Accelerating Android Development and Delivery
PPTX
Keynote: Techday7 appcelerator titanium
PPTX
History of Mobile, Mobile application development and secret to be a great de...
Appcelerator Titanium Intro
Introduction to Appcelerator Titanium
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Teksun Corporate Overview 2014
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
LPWAN Cost Webinar
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
Internet of Things 101 - Part II
콘텐츠 플랫폼 구조 분석
Building the Ultimate Device Matrix
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
CommNexus San Diego Presentation
Introducing Titanium
tiConf (la dediff)
DESIGN West 2013 Presentation: Accelerating Android Development and Delivery
Keynote: Techday7 appcelerator titanium
History of Mobile, Mobile application development and secret to be a great de...
Ad

More from Axway Appcelerator (20)

PDF
Axway Appcelerator - Titanium SDK 6.1.0 - Status, Releases & Roadmap
PPTX
2014 Dublin Web Summit by Jeff Haynie
PPTX
Making the Mobile Mind Shift
PPTX
Stop Debating, Start Measuring
PPTX
Mobile & The New Experience Economy (And What it Means for IT)
PPTX
Apps, APIs & Analytics: What "Mobile First" Really Means
PPTX
Appcelerator Presentation Template
PPTX
Codestrong 2012 keynote jonathan rende, appcelerator's vp of products
PPTX
Codestrong 2012 keynote jeff haynie, appcelerator's ceo
PPTX
Codestrong 2012 keynote how to build a top ten app
PPTX
Codestrong 2012 breakout session at&t api platform and trends
PPTX
Codestrong 2012 breakout session what's new in titanium studio
PPTX
Codestrong 2012 breakout session using appcelerator cloud services in your ...
PPTX
Codestrong 2012 breakout session the role of cloud services in your next ge...
PPTX
Codestrong 2012 breakout session new device platform support for titanium
PPTX
Codestrong 2012 breakout session mobile platform and infrastructure
PPTX
Codestrong 2012 breakout session making money on appcelerator's marketplace
PDF
Codestrong 2012 breakout session live multi-platform testing
PPTX
Codestrong 2012 breakout session leveraging titanium as part of your mobile...
PPTX
Codestrong 2012 breakout session i os internals and best practices
Axway Appcelerator - Titanium SDK 6.1.0 - Status, Releases & Roadmap
2014 Dublin Web Summit by Jeff Haynie
Making the Mobile Mind Shift
Stop Debating, Start Measuring
Mobile & The New Experience Economy (And What it Means for IT)
Apps, APIs & Analytics: What "Mobile First" Really Means
Appcelerator Presentation Template
Codestrong 2012 keynote jonathan rende, appcelerator's vp of products
Codestrong 2012 keynote jeff haynie, appcelerator's ceo
Codestrong 2012 keynote how to build a top ten app
Codestrong 2012 breakout session at&t api platform and trends
Codestrong 2012 breakout session what's new in titanium studio
Codestrong 2012 breakout session using appcelerator cloud services in your ...
Codestrong 2012 breakout session the role of cloud services in your next ge...
Codestrong 2012 breakout session new device platform support for titanium
Codestrong 2012 breakout session mobile platform and infrastructure
Codestrong 2012 breakout session making money on appcelerator's marketplace
Codestrong 2012 breakout session live multi-platform testing
Codestrong 2012 breakout session leveraging titanium as part of your mobile...
Codestrong 2012 breakout session i os internals and best practices

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Big Data Technologies - Introduction.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Encapsulation_ Review paper, used for researhc scholars
Review of recent advances in non-invasive hemoglobin estimation
Big Data Technologies - Introduction.pptx

Rob Chohan: Titanium+Plus Modules and Javascript Bridges: Controlling Hardware with a Web Language

  • 1. Titanium+Plus Modules and Javascript Bridges: Controlling Hardware with a Web Language Rob Chohan Chief Technologist, ePi Rational (C) 2011 ePi Rational, LLC
  • 3. 2001: A Space Odyssey Start around 57'20''
  • 4. Streaming BBC Channel 12 to Space
  • 5. Sweet Spot = Hardware + Software + Content
  • 6. Mobile Architecture, extending Titanium example One Barcode app idea to rule them all!!! Titanium – Open source User Interface & Hardware API Library (Software to be written to tie these together) Zxing or Zebra Crossing – Open source barcode library encode/decode iOS Android Killer Barcode App = Camera +
  • 7. Libraries that are ripe for Titanium+Plus • DropBox • My Tracks, Map or Lat/Long? -117.117203, 32.784180 • Airpush -117.116966, -117.116501, 32.784218 32.784386 -117.116501, 32.784439 -117.116341, 32.784527 • Square -117.116280, 32.784618 • Networking • Google Analytics* • A cryptographically secure RNG that your app needs that Javascript can't provide (e.g., SecureRandom)
  • 8. How To: Appcelerator makes it easy to get started • Titanium generates stubs • From their it is up to you to fill in the blanks • Pull in your favorite JAR, Java, or Obj-C or C++ code • Build and distribute on the Appcelerator Marketplace
  • 9. Hardware that could be interesting to Titanium Developers • Barometer • WiFi • Bluetooth • Near Field Communications (NFC) • ANT+ • GPS
  • 10. Barometer • Motorola chose a What is a Barometer good for Digital Pressure (courtesy of the chip manufacturer, Bosch) Sensor in their • Enhancement of GPS Motorola Xoom navigation • Indoor and outdoor navigation • Leisure and sports • Weather forecast • Vertical velocity indication
  • 11. Barometer, Javascript example • This is a perfect example of how Titanium+Plus can be extended • Barometer usage (targeting Motorola XOOM) var baro = require('epi.baro'); data = baro.getBaro();  // in milliBars, of course
  • 12. Titanium+Module Implementation for a Barometer on Android public void onSensorChanged(SensorEvent event) { long curTime = System.currentTimeMillis();     switch (event.sensor.getType()) {       case Sensor.TYPE_PRESSURE:         if (lastUpdate == -1 || (curTime - lastUpdate) > mTime){            float pressure = event.values[0];         }         break;                case Sensor.TYPE_ACCELEROMETER:         if (lastUpdate == -1 || (curTime - lastUpdate) > mTime){             float x = event.values[0];           float y = event.values[1];           float z = event.values[2];         }         break;     } }
  • 13. Screen from Motorola Xoom, Native App by Noosters 500+ Downloads as of Sep 2011
  • 14. Screen from Motorola Xoom, Native App by Guild Software 5,000+ Downloads as of Sep 2011
  • 15. Screen from Motorola Xoom, Native App by David Momenso 100+ Downloads as of Sep 2011
  • 16. Titanium+Plus Modules helps to lower the bar
  • 17. Data Mining on Android Bluetooth Hardware Apps, Data mined from AndBOT.com, April 2011 • Bluetooth Samples • Bluetooth Bar Widget • Bluetooth Backport for pre-Android 2.0 • Bluetooth Fileshare - Bluex • Bluetooth On/Off for Droid • Bluetooth Remote • Bluetooth text & paint Chat • Bluetooth Terminal • Bluetooth Widget Very useful apps, but what else can be done?
  • 18. Bluetooth now becomes very interesting for Titanium Users What is a Bluetooth good for in the context of Titanium • Chat programs • Getting data from custom sensor boards var btLib = require('epi.bt'); bt = btLib.turnOnRadio();   // discovery bt.discovery(); // pairing // exchanging of data
  • 19. San Diego Based Fitness Startup • San Diego based startup Mobile Phone focusing on Bicycle fitness • Patent pending nutrition and hydration algorithm for cyclists • 100% bootstrapped • Developed a custom sensor board with o wheel revolution counters o digital pressure barometer o another type of pressure sensor o Bluetooth 3 radio Custom Device comm over Bluetooth
  • 20. San Diego Based Fitness Startup why Titanium worked for them • 100% bootstrapped Mobile Phone • team is comprised of o 1 firmware o 1 electrical engineer o 1 Titanium Dev o 1 Bluetooth Dev o 1 Marketing • Each team member was able to focus on their particular part • Team currently at funding stage Custom Device comm over Bluetooth
  • 21. Bluetooth on Android & Titanium+Plus • Android module built for Android 1.6 • Many pitfalls o older firmware and Android • Relies on the Bluetooth phones (wait for supported hardware!) Backport open source jar o building for Titanium from Sosuke Masui, Japan required modifying the Python build scripts for both • Development was started back the Module and the before Bluetooth was Application o Android resources!!!, supported on Android 2.0 created a two-step build process o Port to iOS coming after funding
  • 22. Localization Notes on Titanium+Plus with Android • Android res files for each locale (en, ja, es, ...)
  • 23. Titanium+Plus Modules and Javascript Bridges: Controlling Hardware with a Web Language Rob Chohan Chief Technologist, ePi Rational (C) 2011 ePi Rational, LLC