Transcript
Page 1: Easier Android Development with Titanium

Jeff Bonnes

twitter: @titaniumdev

http://www.titaniumdevelopment.com.au

Easier Android Development

Page 2: Easier Android Development with Titanium

Agenda

• Android Market and Behaviours

• Planning your App

• Smarter Defaults

• Tips, Tricks and Advice

Page 3: Easier Android Development with Titanium

Background

Page 4: Easier Android Development with Titanium

App Download Culture

0

25

50

75

100

iOS Android

Page 5: Easier Android Development with Titanium

App Download Culture

Page 6: Easier Android Development with Titanium

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

Page 7: Easier Android Development with Titanium

Android by the numbers

• Australian Market Share (Dec 2012)

• US Market Share

• Why?

Page 8: Easier Android Development with Titanium

X-platform Examples

Page 9: Easier Android Development with Titanium

X-platform Examples

Page 10: Easier Android Development with Titanium

X-platform Examples

Page 11: Easier Android Development with Titanium

X-platform Examples

Page 12: Easier Android Development with Titanium

Before you code• Target API?

Page 13: Easier Android Development with Titanium

Before you code• Devices / Screen Sizes?

Page 14: Easier Android Development with Titanium

Coding Approaches

• Different Apps

• Different UI Code

• Different CommonJS Modules

Page 15: Easier Android Development with Titanium

Project Setup

• dps vs pixels

• density specific images

Page 16: Easier Android Development with Titanium

Project Setup

• Other tiapp.xml values

Page 17: Easier Android Development with Titanium

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

Page 18: Easier Android Development with Titanium

Navigation

Page 19: Easier Android Development with Titanium

Action Bar

• Android 3.0+ only

• Must use Heavyweight windows

Page 20: Easier Android Development with Titanium

Alternate Navigation• TiXUI

• title

• titleControl

• barImage

• rightNavButton

• leftNavButton

require('xui').createWindow();

Page 21: Easier Android Development with Titanium

Light vs Heavy Windows

• Activity

• Back Button

• Animation

• activityEnterAnimation

• activityExitAnimation

• Memory?

• fullscreen• navBarHidden• modal• windowSoftInputMode

Page 22: Easier Android Development with Titanium

Images

• Don’t allow Android to stretch images

• Don’t use images for backgrounds (especially windows!)

Page 23: Easier Android Development with Titanium

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

Page 24: Easier Android Development with Titanium

Freeing Resources

• Close Windows

• Memory Debugging

• Instruments first

• then DDMS

Page 25: Easier Android Development with Titanium

Intents

• Do less work - use less frameworks

• See Titanium.Android.Intent

Page 26: Easier Android Development with Titanium

Packaging Tricks

• Image Compression

• uses-feature

• Icons - drawables (http://ticons.fokkezb.nl/)

Page 27: Easier Android Development with Titanium

Thank You!

• twitter: @titaniumdev

• http://www.titaniumdevelopment.com.au

• https://github.com/jeffbonnes/TiXUI


Top Related