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.

Andrei Catinean

December 09, 2012
Tweet

More Decks by Andrei Catinean

Other Decks in Programming

Transcript

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

    View Slide

  2. APPLICATION
    INTELLIGENT
    SMOOTH
    INVISIBLE
    EFFICIENT
    RELIABLE
    FRESH

    View Slide

  3. FRESHNESS

    View Slide

  4. FRESHNESS
    Fresher - more battery drain

    View Slide

  5. FRESHNESS
    Fresher - more battery drain
    Location update

    View Slide

  6. FRESHNESS
    LOCATION UPDATE
    Use Passive Location Provider

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  11. FRESHNESS
    Fresher - more battery drain
    Location update
    Data update

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  16. INTELLIGENCE

    View Slide

  17. INTELLIGENCE
    Give as many suggestions as you can

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  21. SMOOTHNESS

    View Slide

  22. SMOOTHNESS
    Fast, responsive and consistent

    View Slide

  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

    View Slide

  24. INVISIBILITY

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  29. EFFICIENCY

    View Slide

  30. EFFICIENCY
    Low battery draining

    View Slide

  31. EFFICIENCY
    How cell radio works

    View Slide

  32. EFFICIENCY
    How cell radio works

    View Slide

  33. EFFICIENCY
    Bundle Cache Intelligent updates

    View Slide

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

    View Slide

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

    View Slide

  36. QUESTIONS ?

    View Slide

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

    View Slide