Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Advanced Techniques

Android Advanced Techniques

Me and my friend Eugeniu Arbuleac had the pleasure to speak about some advanced techniques in developing Android apps at the GDG Timisoara Inaugural Event.

245b117cb79b469cbec69e01a408af9b?s=128

Andrei Catinean

December 09, 2012
Tweet

More Decks by Andrei Catinean

Other Decks in Programming

Transcript

  1. ANDROID ADVANCED TECHNIQUES Eugeniu Arbuleac @arbuleac arbuleac.ev@gmail.com Andrei Catinean @electryc

    andrei.catinean@gmail.com
  2. APPLICATION INTELLIGENT SMOOTH INVISIBLE EFFICIENT RELIABLE FRESH

  3. FRESHNESS

  4. FRESHNESS Fresher - more battery drain

  5. FRESHNESS Fresher - more battery drain Location update

  6. FRESHNESS LOCATION UPDATE Use Passive Location Provider

  7. FRESHNESS LOCATION UPDATE Use Passive Location Provider String passProvider =

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

    Broadcast intents => getting location when your application is not running
  9. FRESHNESS LOCATION UPDATE General flow : get providers get accuracy

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

    set current data Monitor the best provider !
  11. FRESHNESS Fresher - more battery drain Location update Data update

  12. FRESHNESS DATA UPDATE How frequently do you do this ?

  13. FRESHNESS DATA UPDATE How frequently do you do this ?

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

    Alarms Wakeup vs. NonWakeup twice a day every 30 min
  15. FRESHNESS DATA UPDATE Connectivity without: stop alarms poor: less frequent

    updates Battery Manager charged: go update not charged: less updates
  16. INTELLIGENCE

  17. INTELLIGENCE Give as many suggestions as you can

  18. INTELLIGENCE Give as many suggestions as you can AccountManager Autocompletion

  19. INTELLIGENCE Give as many suggestions as you can AccountManager Autocompletion

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

    Sync devices Backup your application data
  21. SMOOTHNESS

  22. SMOOTHNESS Fast, responsive and consistent

  23. 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
  24. INVISIBILITY

  25. INVISIBILITY “Queue and Send” Pattern check(connection); if(!connected){ ! ! addQueue;

    ! } else if(!action){ ! ! ! ! addQueue; } ! retry later;
  26. INVISIBILITY Stick to the design guidelines - use standard patterns

    d.android.com/design
  27. INVISIBILITY LESS is MORE more functionality in less actions Stick

    to the design guidelines - use standard patterns d.android.com/design
  28. INVISIBILITY Droidcon Bucharest 2012 Android UI/UX - Best Practices :

    http://goo.gl/vJBSU
  29. EFFICIENCY

  30. EFFICIENCY Low battery draining

  31. EFFICIENCY How cell radio works

  32. EFFICIENCY How cell radio works

  33. EFFICIENCY Bundle Cache Intelligent updates

  34. RELIABILITY image provided by androidify.com Test your applications

  35. WRAPPING UP Build your FRESH, INTELLIGENT and SMOOTH apps Remain

    invisible Efficiency is your main aim Don’t forget about being reliable
  36. QUESTIONS ?

  37. THANK YOU ! Eugeniu Arbuleac @arbuleac arbuleac.ev@gmail.com Andrei Catinean @electryc

    andrei.catinean@gmail.com