Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Easier Android Development with Titanium

2,009 views

Published on

Tips and tricks to make your Android development with Titanium as painless as possible. Android can be as functional and (almost) as performant as iOS with less 'if' statements. From #ticonf Australia, August 2013.

Published in: Technology
  • Be the first to comment

Easier Android Development with Titanium

  1. 1. Jeff Bonnes twitter: @titaniumdev http://www.titaniumdevelopment.com.au Easier Android Development
  2. 2. Agenda • Android Market and Behaviours • Planning your App • Smarter Defaults • Tips,Tricks and Advice
  3. 3. Background
  4. 4. App Download Culture 0 25 50 75 100 iOS Android
  5. 5. App Download Culture
  6. 6. Android by the numbers • Australian Market Share (Dec 2012) 0% 10.0% 20.0% 30.0% 40.0% 50.0% 60.0% 70.0% 80.0% 90.0% 100.0% iOS Android
  7. 7. Android by the numbers • Australian Market Share (Dec 2012) • US Market Share • Why?
  8. 8. X-platform Examples
  9. 9. X-platform Examples
  10. 10. X-platform Examples
  11. 11. X-platform Examples
  12. 12. Before you code • Target API?
  13. 13. Before you code • Devices / Screen Sizes?
  14. 14. Coding Approaches • Different Apps • Different UI Code • Different CommonJS Modules
  15. 15. Project Setup • dps vs pixels • density specific images
  16. 16. Project Setup • Other tiapp.xml values
  17. 17. Development Workflow • You are using TiShadow, aren’t you? • fastdev • Android 2.3 in Emulator, 4.x on device • Intel x86 Atom System Image: no Google APIs :-( • VM for Emulator • tracer.js
  18. 18. Navigation
  19. 19. Action Bar • Android 3.0+ only • Must use Heavyweight windows
  20. 20. Alternate Navigation • TiXUI • title • titleControl • barImage • rightNavButton • leftNavButton require('xui').createWindow();
  21. 21. Light vs Heavy Windows • Activity • Back Button • Animation • activityEnterAnimation • activityExitAnimation • Memory? • fullscreen • navBarHidden • modal • windowSoftInputMode
  22. 22. Images • Don’t allow Android to stretch images • Don’t use images for backgrounds (especially windows!)
  23. 23. Show only what you need • Things are S L O W E R • JSON Parsing • SQLite Updates • event firing • Load things only as you need them
  24. 24. Freeing Resources • Close Windows • Memory Debugging • Instruments first • then DDMS
  25. 25. Intents • Do less work - use less frameworks • See Titanium.Android.Intent
  26. 26. Packaging Tricks • Image Compression • uses-feature • Icons - drawables (http://ticons.fokkezb.nl/)
  27. 27. ThankYou! • twitter: @titaniumdev • http://www.titaniumdevelopment.com.au • https://github.com/jeffbonnes/TiXUI

×