SlideShare a Scribd company logo
Advanced	
  Titanium	
  Development	
  for	
  Android	
  


              Don	
  Thorp	
  &	
  Marshall	
  Culpepper	
  	
  
Android Tooling
•  Android Debug Bridge (adb)
•  DDMS (Dalvick Debug Monitor Server)
•  “android”
•  “hierarchyviewer”
•  “traceview”




              http://www.appcelerator.com | @appcelerator   2
Android Debug Bridge (adb)
•  the swiss army knife of Android, tons of
   commands, works with emulator & device
•  push / pull: upload / download files
•  install / uninstall applications
•  shell: full /bin/sh system access
•  logcat: app / device logging



              http://www.appcelerator.com | @appcelerator   3
DDMS
•  Graphical frontend to adb, and other
   android SDK tools
•  App process control
•  Colored Logcat output
•  Mock Geo / Phone call / etc control
•  Minimal memory / cpu profiling



              http://www.appcelerator.com | @appcelerator   4
Other Android SDK Tools
•  android
  – manage virtual devices (emulators w/ versions, SDcard
    size, etc)
  – SDK updates, extras
•  “hierarchyviewer”:
  – Layout / UI debugging tool
•  “traceview”
  – Visual call hierarchy / CPU profiling
•  Much more, See the official Android docs (links
   at the end)
                   http://www.appcelerator.com | @appcelerator   5
Android Concepts
•  Application
    – Collection of one or more Activities
       •  Selected by OS w/ Intent filters
    – SDK version compatibility (API Level)
•  Intent
   – Fully serializable data, used between Activities
   – Various fields/options
      •  Action (VIEW, EDIT, SEND, etc), Data (URI)
      •  Category (CATEGORY_LAUNCHER etc)
      •  Mime type (e.g. vnd.android.cursor.item/phone)
      •  Class name (e.g. com.mycompany.Activity)
      •  Extra’s - Custom key/value pairs

                      http://www.appcelerator.com | @appcelerator   6
Android Concepts
•  Activity
  –  Task Stack
    • Inter-app + screen navigation
  –  App entry point
  –  Handle system+custom intents
    • Can return values to other activities
•  Others
  –  Service
  –  Notifications, PendingIntent

                  http://www.appcelerator.com | @appcelerator   7
App/Activity Life Cycle
•  User launches app
 – Intent is fired to app
   with:
   • category:
     CATEGORY_LAUNCHER
   • action: MAIN




                 http://www.appcelerator.com | @appcelerator   8
How do I do that with Ti?
•  Custom JS Activities
  – JS Activities can be simple (launched via URL) or complex
    (launched via intent filter from the system)
  – Configured via tiapp.xml
•  Everything else (mostly) follows a 1:1 mapping w/
   official Android API
  – All constants / create* methods live in Ti.Android
  – i.e. Ti.Android.createIntent
  – Access current activity with Ti.Android.currentActivity
  – Activity.startActivityForResult supports a function
    callback for convenience
                   http://www.appcelerator.com | @appcelerator   9
Resources
•  Use Android density / orientation res
   specifiers in Resources/android/images
•  Arbitrary android native resources can live
   in project s platform/android




               http://www.appcelerator.com | @appcelerator   10
tiapp.xml examples




   http://www.appcelerator.com | @appcelerator   11
JS Examples




http://www.appcelerator.com | @appcelerator   12
Javascript Engines
•  Rhino
  –  Our current Javascript Engine
  –  Java based which allows it to work on devices
   without NDK support
•  V8
  –  Used in Chrome, Chromium, NodeJS, and more
  –  C++ based requires NDK support
  –  Performance 2X minimum, in many cases 10-15x


                http://www.appcelerator.com | @appcelerator   13
Titanium+Android Demos




     http://www.appcelerator.com | @appcelerator   14
Links!
•  Android Tools:
 http://developer.android.com/guide/developing/
 tools/index.html
•  Ti.Android module:
 http://developer.appcelerator.com/apidoc/mobile/
 latest/Titanium.Android-module
•  Services in Titanium:
 http://developer.appcelerator.com/doc/mobile/android-
 simple-services



                 http://www.appcelerator.com | @appcelerator   15

More Related Content

PDF
First Android Experience
PDF
Getting Started with Cross-Platform Mobile Development with Flutter and Dart
PDF
Android101
PPTX
Project a day 2 introduction to android studio
PDF
オープンデータを使った モバイルアプリ開発入門
PPTX
Flutter Intro
PDF
Introduction to Flutter - truly crossplatform, amazingly fast
PPTX
Intro to Ionic for Building Hybrid Mobile Applications
First Android Experience
Getting Started with Cross-Platform Mobile Development with Flutter and Dart
Android101
Project a day 2 introduction to android studio
オープンデータを使った モバイルアプリ開発入門
Flutter Intro
Introduction to Flutter - truly crossplatform, amazingly fast
Intro to Ionic for Building Hybrid Mobile Applications

What's hot (20)

PPTX
React Native
PPTX
PPTX
UI Automation Using Flutter
PPTX
Google I/O 2018 Extended, Baghdad - Flutter
PDF
EclipseCon Europe 2012 Tabris Workshop
PDF
Google IO 2018
PDF
Preparing for Growth - Architecting Giant Apps for Scalability and Build Speed
KEY
Android and JS with Titanium
PPTX
Android development orientation for starters v2
PDF
React Native for multi-platform mobile applications
PDF
Deep Dive into the AOSP
PPT
Dayton webusers creatinghybridapps-webedition
PPTX
12 Best Android Libraries to use in 2021
PDF
Lesson 02 - React Native Development Environment Setup
PDF
Ionic framework one day training
PPTX
Building an Ionic hybrid mobile app with TypeScript
PDF
Getting started-kotlin-android
KEY
Practical guide to building apps
PDF
Lo mejor y peor de React Native @ValenciaJS
PDF
LAP II - Lezione 01 Introduzione al corso
React Native
UI Automation Using Flutter
Google I/O 2018 Extended, Baghdad - Flutter
EclipseCon Europe 2012 Tabris Workshop
Google IO 2018
Preparing for Growth - Architecting Giant Apps for Scalability and Build Speed
Android and JS with Titanium
Android development orientation for starters v2
React Native for multi-platform mobile applications
Deep Dive into the AOSP
Dayton webusers creatinghybridapps-webedition
12 Best Android Libraries to use in 2021
Lesson 02 - React Native Development Environment Setup
Ionic framework one day training
Building an Ionic hybrid mobile app with TypeScript
Getting started-kotlin-android
Practical guide to building apps
Lo mejor y peor de React Native @ValenciaJS
LAP II - Lezione 01 Introduzione al corso
Ad

Similar to Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android (20)

PPT
Drupal and mobile devices komelin konstanin (eng)
PDF
Androidoscon20080721 1216843094441821-9
PDF
Androidoscon20080721 1216843094441821-9
PPTX
Getting started with android programming
PDF
Android development first steps
PPT
Android application development for TresmaxAsia
PDF
Android Presentation
PDF
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
PPT
Lecture 1 Android Application Development.ppt
ZIP
Building iPhone/Andriod Apps with Titanium Appcelerator for a Rails Backend
PPTX
Xamarin tools
PPT
Google android os
PPT
Part 2 android application development 101
PPT
Synapseindia android apps application development
PPT
Introduction to android sessions new
PPTX
MDAD 2 - Introduction to the Android Framework
PPTX
Globus Platform Overview
PDF
Apache Cordova 4.x
PPT
Introduction to Android Development
PPTX
From Containerization to Modularity
Drupal and mobile devices komelin konstanin (eng)
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Getting started with android programming
Android development first steps
Android application development for TresmaxAsia
Android Presentation
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Lecture 1 Android Application Development.ppt
Building iPhone/Andriod Apps with Titanium Appcelerator for a Rails Backend
Xamarin tools
Google android os
Part 2 android application development 101
Synapseindia android apps application development
Introduction to android sessions new
MDAD 2 - Introduction to the Android Framework
Globus Platform Overview
Apache Cordova 4.x
Introduction to Android Development
From Containerization to Modularity
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)

PPT
Teaching material agriculture food technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Empathic Computing: Creating Shared Understanding
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Cloud computing and distributed systems.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Modernizing your data center with Dell and AMD
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Monthly Chronicles - July 2025
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation theory and applications.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Teaching material agriculture food technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Empathic Computing: Creating Shared Understanding
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Dropbox Q2 2025 Financial Results & Investor Presentation
Modernizing your data center with Dell and AMD
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Monthly Chronicles - July 2025
The AUB Centre for AI in Media Proposal.docx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation theory and applications.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication

Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android

  • 1. Advanced  Titanium  Development  for  Android   Don  Thorp  &  Marshall  Culpepper    
  • 2. Android Tooling •  Android Debug Bridge (adb) •  DDMS (Dalvick Debug Monitor Server) •  “android” •  “hierarchyviewer” •  “traceview” http://www.appcelerator.com | @appcelerator 2
  • 3. Android Debug Bridge (adb) •  the swiss army knife of Android, tons of commands, works with emulator & device •  push / pull: upload / download files •  install / uninstall applications •  shell: full /bin/sh system access •  logcat: app / device logging http://www.appcelerator.com | @appcelerator 3
  • 4. DDMS •  Graphical frontend to adb, and other android SDK tools •  App process control •  Colored Logcat output •  Mock Geo / Phone call / etc control •  Minimal memory / cpu profiling http://www.appcelerator.com | @appcelerator 4
  • 5. Other Android SDK Tools •  android – manage virtual devices (emulators w/ versions, SDcard size, etc) – SDK updates, extras •  “hierarchyviewer”: – Layout / UI debugging tool •  “traceview” – Visual call hierarchy / CPU profiling •  Much more, See the official Android docs (links at the end) http://www.appcelerator.com | @appcelerator 5
  • 6. Android Concepts •  Application – Collection of one or more Activities •  Selected by OS w/ Intent filters – SDK version compatibility (API Level) •  Intent – Fully serializable data, used between Activities – Various fields/options •  Action (VIEW, EDIT, SEND, etc), Data (URI) •  Category (CATEGORY_LAUNCHER etc) •  Mime type (e.g. vnd.android.cursor.item/phone) •  Class name (e.g. com.mycompany.Activity) •  Extra’s - Custom key/value pairs http://www.appcelerator.com | @appcelerator 6
  • 7. Android Concepts •  Activity –  Task Stack • Inter-app + screen navigation –  App entry point –  Handle system+custom intents • Can return values to other activities •  Others –  Service –  Notifications, PendingIntent http://www.appcelerator.com | @appcelerator 7
  • 8. App/Activity Life Cycle •  User launches app – Intent is fired to app with: • category: CATEGORY_LAUNCHER • action: MAIN http://www.appcelerator.com | @appcelerator 8
  • 9. How do I do that with Ti? •  Custom JS Activities – JS Activities can be simple (launched via URL) or complex (launched via intent filter from the system) – Configured via tiapp.xml •  Everything else (mostly) follows a 1:1 mapping w/ official Android API – All constants / create* methods live in Ti.Android – i.e. Ti.Android.createIntent – Access current activity with Ti.Android.currentActivity – Activity.startActivityForResult supports a function callback for convenience http://www.appcelerator.com | @appcelerator 9
  • 10. Resources •  Use Android density / orientation res specifiers in Resources/android/images •  Arbitrary android native resources can live in project s platform/android http://www.appcelerator.com | @appcelerator 10
  • 11. tiapp.xml examples http://www.appcelerator.com | @appcelerator 11
  • 13. Javascript Engines •  Rhino –  Our current Javascript Engine –  Java based which allows it to work on devices without NDK support •  V8 –  Used in Chrome, Chromium, NodeJS, and more –  C++ based requires NDK support –  Performance 2X minimum, in many cases 10-15x http://www.appcelerator.com | @appcelerator 13
  • 14. Titanium+Android Demos http://www.appcelerator.com | @appcelerator 14
  • 15. Links! •  Android Tools: http://developer.android.com/guide/developing/ tools/index.html •  Ti.Android module: http://developer.appcelerator.com/apidoc/mobile/ latest/Titanium.Android-module •  Services in Titanium: http://developer.appcelerator.com/doc/mobile/android- simple-services http://www.appcelerator.com | @appcelerator 15