Slide 1

Slide 1 text

Google I/O Extended Lagos ’16 2016 moyinoluwa Moyinoluwa ADEYEMI Android - What’s new?

Slide 2

Slide 2 text

https://ng.linkedin.com/in/moyinoluwa @moyheen @moyheen Moyinoluwa Adeyemi Software Engineer, GDG Lagos Co-organizer

Slide 3

Slide 3 text

Android - What’s new for Nigerian Developers? What if the topic was...

Slide 4

Slide 4 text

Android - What’s new for Nigerian Developers? #IO16 Developers Users

Slide 5

Slide 5 text

#IO16 Developers Users

Slide 6

Slide 6 text

Related Google I/O session Android battery and memory optimizations (https://goo.gl/cVDwub) Doze mode (M vs. N)

Slide 7

Slide 7 text

Doze mode (M vs. N) Android battery and memory optimizations Android battery and memory optimizations

Slide 8

Slide 8 text

Android battery and memory optimizations Battery life and Memory ● Reduce - Reduce all background activity ● Defer - Defer background activities to when device is on charger ● Coalesce - If it can’t be deferred, coalesce it with other background activity to avoid overhead

Slide 9

Slide 9 text

Android Battery and Memory optimizations Alternatively, ● Use the Android JobScheduler API on L+ devices ● or the Firebase JobDispatcher library on Pre-L devices

Slide 10

Slide 10 text

Android JobScheduler An API for scheduling various types of jobs against the framework that will be executed in your application’s own process

Slide 11

Slide 11 text

Firebase JobDispatcher GCM Network Manager === Firebase JobDispatcher A new open source SDK for scheduling and executing background activity on Android. Coming soon for iOS. Available on devices with Google Play Services installed

Slide 12

Slide 12 text

Getting started with JobScheduler/JobDispatcher I/O Codelab g.co/codelabs/jobscheduler

Slide 13

Slide 13 text

Battery Historian Tool for monitoring all impact on the battery github.com/google/battery-historian

Slide 14

Slide 14 text

Related Google I/O sessions Lean and fast - putting your app on a diet (https://goo.gl/Yro9EZ) Image compression for Android Developers (https://goo.gl/bDs011) Putting your app on a diet

Slide 15

Slide 15 text

Components of an APK Lean and Fast - putting your app on a diet

Slide 16

Slide 16 text

Images... PNG JPG WebP - A modern image format that provides superior lossless and lossy compression for images on the web. Get it here: https://developers.google.com/speed/webp/download VectorDrawable - Creates a drawable based on an XML vector graphic

Slide 17

Slide 17 text

Optimize images <4.0: Use webp images instead of jpg and transparent pngs >4.2.1: Use webp images instead of pngs >5.0: Use VectorDrawable <5.0: Use VectorDrawableCompat

Slide 18

Slide 18 text

Other options... android { ……… release { minifyEnabled true shrinkResources true cruncherEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ } }

Slide 19

Slide 19 text

Other options... android { ……… release { minifyEnabled true shrinkResources true cruncherEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ } }

Slide 20

Slide 20 text

Other options... android { ……… release { minifyEnabled true shrinkResources true cruncherEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ } }

Slide 21

Slide 21 text

APK > 100MB Have multiple APKs

Slide 22

Slide 22 text

#IO16 Users Developers

Slide 23

Slide 23 text

Related Google I/O sessions What’s new in Android (https://goo.gl/7BsfNj) What’s new in Android development tools (https://goo.gl/ldgHVG) Development tools

Slide 24

Slide 24 text

Development tools ● Layout Editor ● Constraint Layout ● Layout Inspector ● Firebase Plugin ● Enhanced code analysis ● Samples browser ● Espresso test recorder ● APK Analyzer...

Slide 25

Slide 25 text

Getting started Install Android 2.2 preview 3: https://goo.gl/CiWjqy Helpful articles on ConstraintLayout ● http://android-developers.blogspot.com.ng/2016/05/android-studi o-22-preview-new-ui.html ● http://segunfamisa.com/posts/constraint-layout-in-android ● http://riggaroo.co.za/constraintlayout-101-new-layout-builder-and roid-studio/ ● https://medium.com/google-developer-experts/first-impressions- of-androids-new-constraintlayout-c6d081b2bc2a

Slide 26

Slide 26 text

thank you