ANDROID ADVANCED TECHNIQUES
Eugeniu Arbuleac
@arbuleac
arbuleac.ev@gmail.com

Andrei Catinean
@electryc
andrei.catinean@gmail.com
INTELLIGENT

 FRESH                      SMOOTH




            APPLICATION


INVISIBLE                   RELIABLE

               EFFICIENT
FRESHNESS
FRESHNESS

Fresher - more battery drain
FRESHNESS

Fresher - more battery drain
Location update
FRESHNESS
      LOCATION UPDATE


Use Passive Location Provider
FRESHNESS
               LOCATION UPDATE


      Use Passive Location Provider

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


Use Passive Location Provider

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



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



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

Fresher - more battery drain
Location update
Data update
FRESHNESS
       DATA UPDATE


How frequently do you do this ?
FRESHNESS
       DATA UPDATE


How frequently do you do this ?

Alarms Wakeup vs. NonWakeup
FRESHNESS
        DATA UPDATE


How frequently do you do this ?

Alarms Wakeup vs. NonWakeup

   twice a day         every 30 min
FRESHNESS
    DATA UPDATE


               without: stop alarms

Connectivity
               poor: less frequent updates



                      charged: go update

                                             Battery Manager
                 not charged: less updates
INTELLIGENCE
INTELLIGENCE

Give as many suggestions as you can
INTELLIGENCE

Give as many suggestions as you can


   AccountManager     Autocompletion
INTELLIGENCE

Give as many suggestions as you can


   AccountManager     Autocompletion



Sync devices
INTELLIGENCE

Give as many suggestions as you can


   AccountManager     Autocompletion



Sync devices                     Backup your application data
SMOOTHNESS
SMOOTHNESS

Fast, responsive and consistent
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
INVISIBILITY
INVISIBILITY

“Queue and Send” Pattern
      check(connection);

      if(!connected){
      !
      !   addQueue;
      !
      } else if(!action){
      !   !
      !   !   addQueue;
      }
      !
      retry later;
INVISIBILITY

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

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




                       LESS is MORE
                             more functionality in less actions
INVISIBILITY


Droidcon Bucharest 2012 Android UI/UX - Best Practices : http://goo.gl/vJBSU
EFFICIENCY
EFFICIENCY
         Low battery draining
EFFICIENCY
         How cell radio works
EFFICIENCY
         How cell radio works
EFFICIENCY

Bundle       Cache   Intelligent updates
RELIABILITY
         Test your applications




                                  image provided by
                                    androidify.com
WRAPPING UP

Build your FRESH, INTELLIGENT and SMOOTH apps

Remain invisible

Efficiency is your main aim

Don’t forget about being reliable
QUESTIONS ?
THANK YOU !

Eugeniu Arbuleac                           Andrei Catinean
@arbuleac                                             @electryc
arbuleac.ev@gmail.com                 andrei.catinean@gmail.com

Android Advanced Techniques