SlideShare a Scribd company logo
9-10 novembre 2015
• Gradle build
• Android performance matters
• Ingredient for a healthy code base
• Barcamp
• Trending Android
Droidcon Paris 2015
1. Initialization
Choose project(s) to build
2. Configuration
Execute build.gradle
Build task graph
3. Execution
Execute task chain
Subject application: Google IO app
• 28 libraries
• 53149 method references
• Configuration on Demand
• Gradle Daemon
• Newer versions of gradle
• JVM 1.8 instead of 1.6
• Avoid expensive things during configuration phase
• Don’t use dynamic dependencies (x.y.+)
Droidcon Paris 2015
Package cost : 1.297s
Resource change cost: 0.939s
Jave change cost 4.462s
• dex : 3.766s
• Javac : 0.876s
small project
dev {
multiDexEnabled true
minSdkVersion 21
}
4.633 secs
prod {} 6.599 secs
Bigger prject
dev {
multiDexEnabled true
minSdkVersion 21
}
4.416 secs
prod {
multiDexEnabled true
minSdkVersion 15
}
20.703 secs
Goals of a gradle plugin:
• Create a gradle task that performs a custom task
• Inject this task into the android task graph
• Parametrize this task regarding the needs of the project
• Package it and share it
class MyCustomTask extends DefaultTask {
@Input
def String input;
@Output
def String output;
@TaskAction
def trigger() {
// Do your stuff here
}
}
public class MyPlugin implements Plugin<Project> {
@Override
void apply(Project project) {
project.afterEvaluate ({
def myTask = project.tasks.create("mytask", MyCustomTask
);
myTask.input = "doStuff"
def jarTask = project.tasks.findByName("jar")
jarTask.dependsOn(myTask);
}
})
}
class MyTaskExtension {
def String input = null;
}
public class MyPlugin implements Plugin<Project> {
@Override
void apply(Project project) {
project.extensions.create("myExtension", MyTaskExtension)
project.afterEvaluate ({
// ...
myTask.input = project.myExtension.input
// ...
}
})
}
apply: "myPlugin"
android {
// ...
}
myExtension {
input "doStuff"
}
Droidcon Paris 2015
Droidcon Paris 2015
• Static analysis tools
– checkstyle
– …
• Google Play Store publishing
• Groovy library for git
• Dex count
• Sqlite Analyzer Plugin
• ...
• Gradle performance: https://speakerdeck.com/madisp/squeezing-
the-last-drop-of-performance-out-of-your-gradle-builds-droidcon-
paris-2015
• Build your gradle plugin https://bit.ly/gradle-plugin-next-level
• Improve android builds: https://speakerdeck.com/florianmski/level-
up-your-android-build
Droidcon Paris 2015
• Networking is the main battery consumer
– Less radio time means less data
– Batching to minimize radio transmission
– Prefetching by predicting what the user will do
• GC events eats your app framerate
– Reduce images size
– Use primitives instead of objects
– Keep an eye on your memory with management tools
(AllocationTracker, TraceView)
<RelativeLayout>
<ImageView/>
<LinearLayout>
<TextView/>
<TextView/>
</LinearLayout>
<ImageView/>
<ImageView/>
</RelativeLayout>
<merge>
<ImageView/>
<TextView/>
<TextView/>
<ImageView/>
<ImageView/>
</merge>
->
• Create your own scrolling container
– Movement tracking
– Inertia scrolling
– Scrollbars drawing
– Edge detection to get feedback
Performance Matter - Ran Nachmany, Google
https://youtu.be/04igNM9IpwE?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxXp
FVb0r
ViewGroups - François Blavoet, Deezer
https://youtu.be/MSTG0JPOrYk?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxX
pFVb0r
Advanced Scrolling - Cyril Mottier, Captain Train
https://youtu.be/N3J4ZFiR_3Q?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxX
pFVb0r
Droidcon Paris 2015
Droidcon Paris 2015
DATA LAYER
DOMAIN LAYER
PRESENTER LAYER
Retrofit client DB client
ArtistRepository
• Shared preferences
• ContentProvider
• BDD
• Orchestrates the flow of data with use “cases”
• Offers its services to presentation layer
• Pure Java module
• No Android UI dependencies
• No dependency to external source (db,content
provider, shared preferences…)
▸ public class Artist {
String displayName;
Date onTourUntil;
String uri;
String id;
String url;
String htmlUrl;
String …;
Object…;
Object …;
Object …;
}
public class ArtistViewModel {
String name;
boolean isOnTour;
}
VIEW MODEL PRESENTER VIEW
public interface SearchPresenter {
void searchUser(String searchItem);
void clickUser(ArtistViewModel artist);
}
public interface SearchView {
void showProgress();
void hideProgress();
void showUser(List<ArtistViewModel> artistes);
}
VIEW MODEL PRESENTER VIEW
public class SearchFragment extends Fragment implements SearchView {
private SearchPresenter searchPresenter;
@Override
public void showProgress() {
//...
}
@Override
public void hideProgress() {
//...
}
@Override
public void showUser(List<UserViewModel> users) {
//...
}
}
DATA LAYER
DOMAIN LAYER
PRESENTER LAYER
OBSERVABLE<MODEL>
OBSERVABLE<VIEWMODEL>
SUBSCRIBER<VIEWMODEL>
• Provides dependency: @Provides and @Module
• Request dependency: @Inject
• Link modules and injections: @Component
• Implement the singleton pattern : @Singleton
APPLICATION
MODULE
ACTIVITY
MODULE
FRAGMENT
MODULE
Repository
Domain
Activity
Activity
component
Application
component
Presenter
Use case
DATA LAYER
DOMAIN LAYER
PRESENTER LAYER
USER REPOSITORY
SEARCH USED CASE
SEARCH PRESENTER
SEARCH FRAGMENT
DATA LAYER
DOMAIN LAYER
PRESENTER LAYER
.JSON
• Choose an architecture and stick with it
• Test while your code
• Retrofit
• Dagger 2
• Rx-java
• Espresso
• Junit
• Clean Architecture : https://www.youtube.com/watch?v=-
oZswd1j5H0
• Slide https://speakerdeck.com/romainpiel/ingredients-for-a-healthy-
codebase
• Presentation Dagger 2 :
https://www.youtube.com/watch?v=IkTST564lA4
• slide Dagger 2 https://speakerdeck.com/jeremiemartinez/dagger-2-
back-to-basics
It’s a tool to :
▸ Enhance modularity
▸ Focus on business logic
▸ Reduce noise in the source code
Occurs at compile time with byte code
modification
Droidcon Paris 2015
Droidcon Paris 2015
Droidcon Paris 2015
• To minimize the code necessary to bind your
logic and your view
• Still in Beta
• Support library API 7
<data>
<variable name="user" type="com.example.User"/>
</data>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{user.firstName}”
/>
public class User {
public final String firstName;
public final String lastName;
public User (String firstName, String
lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MainActivityBinding binding = MainActivityBinding.inflate(getLayoutInflater());
User user = new User("Test", "User");
binding.setUser(user);
}
Le Data Binding sur Android - Guillaume Bernard, Koridev
https://youtu.be/fG_93vUfm5s?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxXpFV
b0r
Data Binding -- Write Apps Faster (Android Dev Summit
2015)
https://youtu.be/NBbeQMOcnZ0
• Android Emulator
• Gives control on hardware features :
– Control the battery level
– GPS Location
– Network and call management $
Droidcon Paris 2015
• Jack & Jill
• Kotlin
• Eddystone
Java Android Compiler Kit
Jack Intermediate Library Linker
Goal is to improve incremental build
More efficient to compile compared to javac
+ dex, but still experimental
Droidcon Paris 2015
The swift of Android ?
Kotlin is compiled to Java bytecode
Possibility to use both java and Kotlin in the same
project
Pros
• Compile time detection of NPE with
nullable type
• Lambda
• Type inference
• Class extensions
Cons
• Overhead of 924 KB for runtime
• Still in beta
• Will it be adopted by the community ?
Beacon
• Autonomous
• Cheap (15-20€)
• Advertise data in a one way communication
Eddystone
Open beacon format
3 possible messages with Eddystone
• UID
– Beacon broadcast its unique identifier
• URL
– Beacon broadcast
– Physical web
– Short range and contactless QRCode
• TLM (Telemetry)
– Maintenance (battery level, …)
Droidcon Paris 2015
Evolution inside the android build system
https://drive.google.com/file/d/0B1CCib0JzAOJRXZSY0c1ckZTU0E
Kotlin for Android
https://www.youtube.com/watch?v=50lASllvG3Q
Eddystone
https://www.youtube.com/watch?v=HR3X5h9xdno
Droidcon Paris 2015
ANDROID STUDIO 2.0
USABILITY (GUI)
GPS POINTS
KML
BATTERY
PHONE CALL
SMS
ROTATION
RESIZE
DRAG-DROP
FINGERPRINT

More Related Content

PDF
node.js on Google Compute Engine
Arun Nagarajan
 
PDF
Google Cloud Platform Special Training
Simon Su
 
PDF
Google compute engine - overview
Charles Fan
 
PDF
Google Compute Engine Starter Guide
Simon Su
 
PDF
Magnolia CMS and Rails
Magnolia
 
PDF
Get Ready to Become Google Associate Cloud Engineer
Amaaira Johns
 
PDF
JCConf 2016 - Google Dataflow 小試
Simon Su
 
PPT
Using Google Compute Engine
Lynn Langit
 
node.js on Google Compute Engine
Arun Nagarajan
 
Google Cloud Platform Special Training
Simon Su
 
Google compute engine - overview
Charles Fan
 
Google Compute Engine Starter Guide
Simon Su
 
Magnolia CMS and Rails
Magnolia
 
Get Ready to Become Google Associate Cloud Engineer
Amaaira Johns
 
JCConf 2016 - Google Dataflow 小試
Simon Su
 
Using Google Compute Engine
Lynn Langit
 

What's hot (20)

PPTX
SEC302 Twitter's GCP Architecture for its petabyte scale data storage in gcs...
Vrushali Channapattan
 
PDF
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Chris Jang
 
PDF
Introduction to Google Compute Engine
Colin Su
 
PDF
Google Cloud Dataflow meets TensorFlow
Hayato Yoshikawa
 
PPTX
Google Compute Engine
Csaba Toth
 
PDF
Google App Engine (GAE) 演進史
Simon Su
 
PDF
iOS 8 and iPhone 6 for web developers and designers
Zhi Zhong
 
PPTX
Using Google App Engine Python
Akshay Mathur
 
PDF
Hands on Compute Engine
Simon Su
 
PDF
Grails Integration Strategies
daveklein
 
PDF
Grails resources
Colin Harrington
 
PDF
WebGL의 무궁무진한 가능성
Jun Ho Lee
 
PDF
The new static resources framework
marcplmer
 
PPTX
30 Days of Google Cloud
AshwinRaj57
 
PPTX
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
PDF
Google Cloud Networking Deep Dive
Michelle Holley
 
PDF
Drools Happenings 7.0 - Devnation 2016
Mark Proctor
 
PPTX
30 Days of Google Cloud Program Kickstart Session
vaishnaviayyappan
 
PDF
GCPUG.TW - GCP學習資源分享
Simon Su
 
PDF
Next Generation Cloud Computing With Google - RightScale Compute 2013
RightScale
 
SEC302 Twitter's GCP Architecture for its petabyte scale data storage in gcs...
Vrushali Channapattan
 
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Chris Jang
 
Introduction to Google Compute Engine
Colin Su
 
Google Cloud Dataflow meets TensorFlow
Hayato Yoshikawa
 
Google Compute Engine
Csaba Toth
 
Google App Engine (GAE) 演進史
Simon Su
 
iOS 8 and iPhone 6 for web developers and designers
Zhi Zhong
 
Using Google App Engine Python
Akshay Mathur
 
Hands on Compute Engine
Simon Su
 
Grails Integration Strategies
daveklein
 
Grails resources
Colin Harrington
 
WebGL의 무궁무진한 가능성
Jun Ho Lee
 
The new static resources framework
marcplmer
 
30 Days of Google Cloud
AshwinRaj57
 
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
Google Cloud Networking Deep Dive
Michelle Holley
 
Drools Happenings 7.0 - Devnation 2016
Mark Proctor
 
30 Days of Google Cloud Program Kickstart Session
vaishnaviayyappan
 
GCPUG.TW - GCP學習資源分享
Simon Su
 
Next Generation Cloud Computing With Google - RightScale Compute 2013
RightScale
 
Ad

Similar to Droidcon Paris 2015 (20)

PDF
Stmik bandung
farid savarudin
 
PPTX
Android dev toolbox
Shem Magnezi
 
PPTX
Google I/O 2019 - what's new in Android Q and Jetpack
Sunita Singh
 
PPTX
Android Developer Toolbox 2017
Shem Magnezi
 
PDF
Android dev toolbox - Shem Magnezi, WeWork
DroidConTLV
 
PPTX
Android development with Scala and SBT
Anton Yalyshev
 
PPTX
Performance #5 cpu and battery
Vitali Pekelis
 
PDF
Android UI Development: Tips, Tricks, and Techniques
Edgar Gonzalez
 
PDF
Android UI Tips, Tricks and Techniques
Marakana Inc.
 
PDF
Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Ma...
Infinum
 
PDF
Lightning talk: Kotlin
Evolve
 
PPTX
Why kotlininandroid
Phani Kumar Gullapalli
 
PDF
Kotlin for android developers whats new
Serghii Chaban
 
PDF
Innovation Generation - The Mobile Meetup: Android Best Practices
Solstice Mobile Argentina
 
PPTX
ProTips DroidCon Paris 2013
Mathias Seguy
 
PPTX
從零開始學 Android
秀吉(Hsiu-Chi) 蔡(Tsai)
 
PPTX
Lecture android best practices
eleksdev
 
PDF
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Daniel Gallego Vico
 
PDF
MVVM & Data Binding Library
10Clouds
 
PDF
Building android apps with kotlin
Shem Magnezi
 
Stmik bandung
farid savarudin
 
Android dev toolbox
Shem Magnezi
 
Google I/O 2019 - what's new in Android Q and Jetpack
Sunita Singh
 
Android Developer Toolbox 2017
Shem Magnezi
 
Android dev toolbox - Shem Magnezi, WeWork
DroidConTLV
 
Android development with Scala and SBT
Anton Yalyshev
 
Performance #5 cpu and battery
Vitali Pekelis
 
Android UI Development: Tips, Tricks, and Techniques
Edgar Gonzalez
 
Android UI Tips, Tricks and Techniques
Marakana Inc.
 
Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Ma...
Infinum
 
Lightning talk: Kotlin
Evolve
 
Why kotlininandroid
Phani Kumar Gullapalli
 
Kotlin for android developers whats new
Serghii Chaban
 
Innovation Generation - The Mobile Meetup: Android Best Practices
Solstice Mobile Argentina
 
ProTips DroidCon Paris 2013
Mathias Seguy
 
從零開始學 Android
秀吉(Hsiu-Chi) 蔡(Tsai)
 
Lecture android best practices
eleksdev
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Daniel Gallego Vico
 
MVVM & Data Binding Library
10Clouds
 
Building android apps with kotlin
Shem Magnezi
 
Ad

Recently uploaded (20)

PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Software Development Methodologies in 2025
KodekX
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 

Droidcon Paris 2015

  • 2. • Gradle build • Android performance matters • Ingredient for a healthy code base • Barcamp • Trending Android
  • 4. 1. Initialization Choose project(s) to build 2. Configuration Execute build.gradle Build task graph 3. Execution Execute task chain
  • 5. Subject application: Google IO app • 28 libraries • 53149 method references
  • 6. • Configuration on Demand • Gradle Daemon • Newer versions of gradle • JVM 1.8 instead of 1.6 • Avoid expensive things during configuration phase • Don’t use dynamic dependencies (x.y.+)
  • 8. Package cost : 1.297s Resource change cost: 0.939s Jave change cost 4.462s • dex : 3.766s • Javac : 0.876s
  • 9. small project dev { multiDexEnabled true minSdkVersion 21 } 4.633 secs prod {} 6.599 secs Bigger prject dev { multiDexEnabled true minSdkVersion 21 } 4.416 secs prod { multiDexEnabled true minSdkVersion 15 } 20.703 secs
  • 10. Goals of a gradle plugin: • Create a gradle task that performs a custom task • Inject this task into the android task graph • Parametrize this task regarding the needs of the project • Package it and share it
  • 11. class MyCustomTask extends DefaultTask { @Input def String input; @Output def String output; @TaskAction def trigger() { // Do your stuff here } }
  • 12. public class MyPlugin implements Plugin<Project> { @Override void apply(Project project) { project.afterEvaluate ({ def myTask = project.tasks.create("mytask", MyCustomTask ); myTask.input = "doStuff" def jarTask = project.tasks.findByName("jar") jarTask.dependsOn(myTask); } }) }
  • 13. class MyTaskExtension { def String input = null; }
  • 14. public class MyPlugin implements Plugin<Project> { @Override void apply(Project project) { project.extensions.create("myExtension", MyTaskExtension) project.afterEvaluate ({ // ... myTask.input = project.myExtension.input // ... } }) }
  • 15. apply: "myPlugin" android { // ... } myExtension { input "doStuff" }
  • 18. • Static analysis tools – checkstyle – … • Google Play Store publishing • Groovy library for git • Dex count • Sqlite Analyzer Plugin • ...
  • 19. • Gradle performance: https://speakerdeck.com/madisp/squeezing- the-last-drop-of-performance-out-of-your-gradle-builds-droidcon- paris-2015 • Build your gradle plugin https://bit.ly/gradle-plugin-next-level • Improve android builds: https://speakerdeck.com/florianmski/level- up-your-android-build
  • 21. • Networking is the main battery consumer – Less radio time means less data – Batching to minimize radio transmission – Prefetching by predicting what the user will do
  • 22. • GC events eats your app framerate – Reduce images size – Use primitives instead of objects – Keep an eye on your memory with management tools (AllocationTracker, TraceView)
  • 24. • Create your own scrolling container – Movement tracking – Inertia scrolling – Scrollbars drawing – Edge detection to get feedback
  • 25. Performance Matter - Ran Nachmany, Google https://youtu.be/04igNM9IpwE?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxXp FVb0r ViewGroups - François Blavoet, Deezer https://youtu.be/MSTG0JPOrYk?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxX pFVb0r Advanced Scrolling - Cyril Mottier, Captain Train https://youtu.be/N3J4ZFiR_3Q?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxX pFVb0r
  • 29. Retrofit client DB client ArtistRepository • Shared preferences • ContentProvider • BDD
  • 30. • Orchestrates the flow of data with use “cases” • Offers its services to presentation layer • Pure Java module • No Android UI dependencies • No dependency to external source (db,content provider, shared preferences…)
  • 31. ▸ public class Artist { String displayName; Date onTourUntil; String uri; String id; String url; String htmlUrl; String …; Object…; Object …; Object …; } public class ArtistViewModel { String name; boolean isOnTour; } VIEW MODEL PRESENTER VIEW
  • 32. public interface SearchPresenter { void searchUser(String searchItem); void clickUser(ArtistViewModel artist); } public interface SearchView { void showProgress(); void hideProgress(); void showUser(List<ArtistViewModel> artistes); } VIEW MODEL PRESENTER VIEW
  • 33. public class SearchFragment extends Fragment implements SearchView { private SearchPresenter searchPresenter; @Override public void showProgress() { //... } @Override public void hideProgress() { //... } @Override public void showUser(List<UserViewModel> users) { //... } }
  • 34. DATA LAYER DOMAIN LAYER PRESENTER LAYER OBSERVABLE<MODEL> OBSERVABLE<VIEWMODEL> SUBSCRIBER<VIEWMODEL>
  • 35. • Provides dependency: @Provides and @Module • Request dependency: @Inject • Link modules and injections: @Component • Implement the singleton pattern : @Singleton
  • 37. DATA LAYER DOMAIN LAYER PRESENTER LAYER USER REPOSITORY SEARCH USED CASE SEARCH PRESENTER SEARCH FRAGMENT
  • 39. • Choose an architecture and stick with it • Test while your code • Retrofit • Dagger 2 • Rx-java • Espresso • Junit
  • 40. • Clean Architecture : https://www.youtube.com/watch?v=- oZswd1j5H0 • Slide https://speakerdeck.com/romainpiel/ingredients-for-a-healthy- codebase • Presentation Dagger 2 : https://www.youtube.com/watch?v=IkTST564lA4 • slide Dagger 2 https://speakerdeck.com/jeremiemartinez/dagger-2- back-to-basics
  • 41. It’s a tool to : ▸ Enhance modularity ▸ Focus on business logic ▸ Reduce noise in the source code Occurs at compile time with byte code modification
  • 45. • To minimize the code necessary to bind your logic and your view • Still in Beta • Support library API 7
  • 47. public class User { public final String firstName; public final String lastName; public User (String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } }
  • 48. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); MainActivityBinding binding = MainActivityBinding.inflate(getLayoutInflater()); User user = new User("Test", "User"); binding.setUser(user); }
  • 49. Le Data Binding sur Android - Guillaume Bernard, Koridev https://youtu.be/fG_93vUfm5s?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxXpFV b0r Data Binding -- Write Apps Faster (Android Dev Summit 2015) https://youtu.be/NBbeQMOcnZ0
  • 50. • Android Emulator • Gives control on hardware features : – Control the battery level – GPS Location – Network and call management $
  • 52. • Jack & Jill • Kotlin • Eddystone
  • 53. Java Android Compiler Kit Jack Intermediate Library Linker Goal is to improve incremental build More efficient to compile compared to javac + dex, but still experimental
  • 55. The swift of Android ?
  • 56. Kotlin is compiled to Java bytecode Possibility to use both java and Kotlin in the same project
  • 57. Pros • Compile time detection of NPE with nullable type • Lambda • Type inference • Class extensions
  • 58. Cons • Overhead of 924 KB for runtime • Still in beta • Will it be adopted by the community ?
  • 59. Beacon • Autonomous • Cheap (15-20€) • Advertise data in a one way communication Eddystone Open beacon format
  • 60. 3 possible messages with Eddystone • UID – Beacon broadcast its unique identifier • URL – Beacon broadcast – Physical web – Short range and contactless QRCode • TLM (Telemetry) – Maintenance (battery level, …)
  • 62. Evolution inside the android build system https://drive.google.com/file/d/0B1CCib0JzAOJRXZSY0c1ckZTU0E Kotlin for Android https://www.youtube.com/watch?v=50lASllvG3Q Eddystone https://www.youtube.com/watch?v=HR3X5h9xdno
  • 65. USABILITY (GUI) GPS POINTS KML BATTERY PHONE CALL SMS ROTATION RESIZE DRAG-DROP FINGERPRINT