Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Upcoming SlideShare
Loading in...5
×
 

Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android

on

  • 1,378 views

In this presentation, we will provide an overview of native Android tooling and some of its uses. We will also cover several Android specific concepts and APIs and discuss how you can use them when ...

In this presentation, we will provide an overview of native Android tooling and some of its uses. We will also cover several Android specific concepts and APIs and discuss how you can use them when creating a best of breed application.

Tooling
- DDMS
- adb (Android Debug Bridge)
- android (Downloading SDKs, Managing AVDs)

APIs
- Android Lifecycle Events
- Intents, Activities, Notifications
- Javascript Activities
- Resources
- Android Section of tiapp.xml

Statistics

Views

Total Views
1,378
Views on SlideShare
1,119
Embed Views
259

Actions

Likes
0
Downloads
29
Comments
0

4 Embeds 259

http://www.appcelerator.com 243
http://tidevcn.com 13
http://cache.baidu.com 2
http://dev-conf.ru 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android Presentation Transcript

  • 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 View slide
  • 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 View slide
  • 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 Exampleshttp://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