SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

EclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopEclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris Workshop
Holger Staudacher
 
Preparing for Growth - Architecting Giant Apps for Scalability and Build Speed
Preparing for Growth - Architecting Giant Apps for Scalability and Build SpeedPreparing for Growth - Architecting Giant Apps for Scalability and Build Speed
Preparing for Growth - Architecting Giant Apps for Scalability and Build Speed
Bruno Rocha
 
Dayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webeditionDayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webedition
Martin Davis III
 
Practical guide to building apps
Practical guide to building apps Practical guide to building apps
Practical guide to building apps
Phase2
 

Was ist angesagt? (20)

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

Ähnlich wie Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android

Drupal and mobile devices komelin konstanin (eng)
Drupal and mobile devices komelin konstanin (eng)Drupal and mobile devices komelin konstanin (eng)
Drupal and mobile devices komelin konstanin (eng)
drupalconf
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Gustavo Fuentes Zurita
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Gustavo Fuentes Zurita
 
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
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
Joe Jacob
 

Ähnlich wie Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android (20)

Drupal and mobile devices komelin konstanin (eng)
Drupal and mobile devices komelin konstanin (eng)Drupal and mobile devices komelin konstanin (eng)
Drupal and mobile devices komelin konstanin (eng)
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
 
Android Presentation
Android PresentationAndroid Presentation
Android Presentation
 
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
 
Building iPhone/Andriod Apps with Titanium Appcelerator for a Rails Backend
Building iPhone/Andriod Apps with Titanium Appcelerator for a Rails BackendBuilding iPhone/Andriod Apps with Titanium Appcelerator for a Rails Backend
Building iPhone/Andriod Apps with Titanium Appcelerator for a Rails Backend
 
Xamarin tools
Xamarin toolsXamarin tools
Xamarin tools
 
Google android os
Google android osGoogle android os
Google android os
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Synapseindia android apps application development
Synapseindia android apps application developmentSynapseindia android apps application development
Synapseindia android apps application development
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
MDAD 2 - Introduction to the Android Framework
MDAD 2 - Introduction to the Android FrameworkMDAD 2 - Introduction to the Android Framework
MDAD 2 - Introduction to the Android Framework
 
Globus Platform Overview
Globus Platform OverviewGlobus Platform Overview
Globus Platform Overview
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
From Containerization to Modularity
From Containerization to ModularityFrom Containerization to Modularity
From Containerization to Modularity
 
Android Development
Android DevelopmentAndroid Development
Android Development
 

Mehr von Axway Appcelerator

Codestrong 2012 keynote jonathan rende, appcelerator's vp of products
Codestrong 2012 keynote   jonathan rende, appcelerator's vp of productsCodestrong 2012 keynote   jonathan rende, appcelerator's vp of products
Codestrong 2012 keynote jonathan rende, appcelerator's vp of products
Axway Appcelerator
 
Codestrong 2012 keynote jeff haynie, appcelerator's ceo
Codestrong 2012 keynote   jeff haynie, appcelerator's ceoCodestrong 2012 keynote   jeff haynie, appcelerator's ceo
Codestrong 2012 keynote jeff haynie, appcelerator's ceo
Axway Appcelerator
 
Codestrong 2012 keynote how to build a top ten app
Codestrong 2012 keynote   how to build a top ten appCodestrong 2012 keynote   how to build a top ten app
Codestrong 2012 keynote how to build a top ten app
Axway Appcelerator
 
Codestrong 2012 breakout session at&t api platform and trends
Codestrong 2012 breakout session  at&t api platform and trendsCodestrong 2012 breakout session  at&t api platform and trends
Codestrong 2012 breakout session at&t api platform and trends
Axway Appcelerator
 
Codestrong 2012 breakout session what's new in titanium studio
Codestrong 2012 breakout session   what's new in titanium studioCodestrong 2012 breakout session   what's new in titanium studio
Codestrong 2012 breakout session what's new in titanium studio
Axway Appcelerator
 
Codestrong 2012 breakout session using appcelerator cloud services in your ...
Codestrong 2012 breakout session   using appcelerator cloud services in your ...Codestrong 2012 breakout session   using appcelerator cloud services in your ...
Codestrong 2012 breakout session using appcelerator cloud services in your ...
Axway Appcelerator
 
Codestrong 2012 breakout session the role of cloud services in your next ge...
Codestrong 2012 breakout session   the role of cloud services in your next ge...Codestrong 2012 breakout session   the role of cloud services in your next ge...
Codestrong 2012 breakout session the role of cloud services in your next ge...
Axway Appcelerator
 
Codestrong 2012 breakout session new device platform support for titanium
Codestrong 2012 breakout session   new device platform support for titaniumCodestrong 2012 breakout session   new device platform support for titanium
Codestrong 2012 breakout session new device platform support for titanium
Axway Appcelerator
 
Codestrong 2012 breakout session mobile platform and infrastructure
Codestrong 2012 breakout session   mobile platform and infrastructureCodestrong 2012 breakout session   mobile platform and infrastructure
Codestrong 2012 breakout session mobile platform and infrastructure
Axway Appcelerator
 
Codestrong 2012 breakout session making money on appcelerator's marketplace
Codestrong 2012 breakout session   making money on appcelerator's marketplaceCodestrong 2012 breakout session   making money on appcelerator's marketplace
Codestrong 2012 breakout session making money on appcelerator's marketplace
Axway Appcelerator
 
Codestrong 2012 breakout session live multi-platform testing
Codestrong 2012 breakout session   live multi-platform testingCodestrong 2012 breakout session   live multi-platform testing
Codestrong 2012 breakout session live multi-platform testing
Axway Appcelerator
 
Codestrong 2012 breakout session leveraging titanium as part of your mobile...
Codestrong 2012 breakout session   leveraging titanium as part of your mobile...Codestrong 2012 breakout session   leveraging titanium as part of your mobile...
Codestrong 2012 breakout session leveraging titanium as part of your mobile...
Axway Appcelerator
 
Codestrong 2012 breakout session i os internals and best practices
Codestrong 2012 breakout session   i os internals and best practicesCodestrong 2012 breakout session   i os internals and best practices
Codestrong 2012 breakout session i os internals and best practices
Axway Appcelerator
 

Mehr von Axway Appcelerator (20)

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

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation 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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

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