Android - What's new?

Post on 06-Jan-2017

473 views 0 download

transcript

Google I/O Extended Lagos ’16 2016moyinoluwa Moyinoluwa ADEYEMI

Android - What’s new?

https://ng.linkedin.com/in/moyinoluwa@moyheen

@moyheen

Moyinoluwa AdeyemiSoftware Engineer, GDG Lagos Co-organizer

Android - What’s new for Nigerian Developers?

What if the topic was...

Android - What’s new for Nigerian Developers?

#IO16

Developers

Users

#IO16

Developers

Users

Related Google I/O sessionAndroid battery and memory optimizations(https://goo.gl/cVDwub)

Doze mode (M vs. N)

Doze mode (M vs. N)

Android battery and memory optimizations Android battery and memory optimizations

Android battery and memory optimizationsBattery life and MemoryReduce - 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

Android Battery and Memory optimizationsAlternatively,

Use the Android JobScheduler API on L+ devicesor the Firebase JobDispatcher library on Pre-L devices

Android JobScheduler

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

Firebase JobDispatcherGCM 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

Getting started with JobScheduler/JobDispatcher

I/O Codelabg.co/codelabs/jobscheduler

Battery Historian

Tool for monitoring all impact on the battery

github.com/google/battery-historian

Related Google I/O sessionsLean 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

Components of an APK

Lean and Fast - putting your app on a diet

Images...PNGJPGWebP - 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

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

Other options...android { ………

release {minifyEnabled trueshrinkResources truecruncherEnabled falseproguardFiles

getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’

}}

Other options...android { ………

release {minifyEnabled trueshrinkResources truecruncherEnabled falseproguardFiles

getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’

}}

Other options...android { ………

release {minifyEnabled trueshrinkResources truecruncherEnabled falseproguardFiles

getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’

}}

APK > 100MB

Have multiple APKs

#IO16

Users Developers

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

Development tools

Development toolsLayout EditorConstraint LayoutLayout InspectorFirebase PluginEnhanced code analysisSamples browserEspresso test recorderAPK Analyzer...

thankyou