Slide 1

Slide 1 text

ANDROID ADVANCED TECHNIQUES Eugeniu Arbuleac @arbuleac [email protected] Andrei Catinean @electryc [email protected]

Slide 2

Slide 2 text

APPLICATION INTELLIGENT SMOOTH INVISIBLE EFFICIENT RELIABLE FRESH

Slide 3

Slide 3 text

FRESHNESS

Slide 4

Slide 4 text

FRESHNESS Fresher - more battery drain

Slide 5

Slide 5 text

FRESHNESS Fresher - more battery drain Location update

Slide 6

Slide 6 text

FRESHNESS LOCATION UPDATE Use Passive Location Provider

Slide 7

Slide 7 text

FRESHNESS LOCATION UPDATE Use Passive Location Provider String passProvider = LocationManager.PASSIVE_PROVIDER; locManager.requestLocationUpdates(passProvider,minTime, minDistance, locListener);

Slide 8

Slide 8 text

FRESHNESS LOCATION UPDATE Use Passive Location Provider Location listener + Broadcast intents => getting location when your application is not running

Slide 9

Slide 9 text

FRESHNESS LOCATION UPDATE General flow : get providers get accuracy set current data

Slide 10

Slide 10 text

FRESHNESS LOCATION UPDATE General flow : get providers get accuracy set current data Monitor the best provider !

Slide 11

Slide 11 text

FRESHNESS Fresher - more battery drain Location update Data update

Slide 12

Slide 12 text

FRESHNESS DATA UPDATE How frequently do you do this ?

Slide 13

Slide 13 text

FRESHNESS DATA UPDATE How frequently do you do this ? Alarms Wakeup vs. NonWakeup

Slide 14

Slide 14 text

FRESHNESS DATA UPDATE How frequently do you do this ? Alarms Wakeup vs. NonWakeup twice a day every 30 min

Slide 15

Slide 15 text

FRESHNESS DATA UPDATE Connectivity without: stop alarms poor: less frequent updates Battery Manager charged: go update not charged: less updates

Slide 16

Slide 16 text

INTELLIGENCE

Slide 17

Slide 17 text

INTELLIGENCE Give as many suggestions as you can

Slide 18

Slide 18 text

INTELLIGENCE Give as many suggestions as you can AccountManager Autocompletion

Slide 19

Slide 19 text

INTELLIGENCE Give as many suggestions as you can AccountManager Autocompletion Sync devices

Slide 20

Slide 20 text

INTELLIGENCE Give as many suggestions as you can AccountManager Autocompletion Sync devices Backup your application data

Slide 21

Slide 21 text

SMOOTHNESS

Slide 22

Slide 22 text

SMOOTHNESS Fast, responsive and consistent

Slide 23

Slide 23 text

SMOOTHNESS Fast, responsive and consistent Move all your tasks to background - use AsyncTask and Loader API Droidcon Bucharest 2012 Roman Mazur keynote - http://goo.gl/XR5HU

Slide 24

Slide 24 text

INVISIBILITY

Slide 25

Slide 25 text

INVISIBILITY “Queue and Send” Pattern check(connection); if(!connected){ ! ! addQueue; ! } else if(!action){ ! ! ! ! addQueue; } ! retry later;

Slide 26

Slide 26 text

INVISIBILITY Stick to the design guidelines - use standard patterns d.android.com/design

Slide 27

Slide 27 text

INVISIBILITY LESS is MORE more functionality in less actions Stick to the design guidelines - use standard patterns d.android.com/design

Slide 28

Slide 28 text

INVISIBILITY Droidcon Bucharest 2012 Android UI/UX - Best Practices : http://goo.gl/vJBSU

Slide 29

Slide 29 text

EFFICIENCY

Slide 30

Slide 30 text

EFFICIENCY Low battery draining

Slide 31

Slide 31 text

EFFICIENCY How cell radio works

Slide 32

Slide 32 text

EFFICIENCY How cell radio works

Slide 33

Slide 33 text

EFFICIENCY Bundle Cache Intelligent updates

Slide 34

Slide 34 text

RELIABILITY image provided by androidify.com Test your applications

Slide 35

Slide 35 text

WRAPPING UP Build your FRESH, INTELLIGENT and SMOOTH apps Remain invisible Efficiency is your main aim Don’t forget about being reliable

Slide 36

Slide 36 text

QUESTIONS ?

Slide 37

Slide 37 text

THANK YOU ! Eugeniu Arbuleac @arbuleac [email protected] Andrei Catinean @electryc [email protected]